mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2025-01-06 03:27:17 +03:00
boot: switch_root: Ignore bogus init parameter
These will be provided by proprietary bootloader (e.g. google-blueline), and cannot be removed. Thus we'll ignore any bogus parameter. (cherry picked from commit c961ca142650fead3c3b565cfc59f8ae0662d771)
This commit is contained in:
parent
e4b6f680b2
commit
e4414042bc
@ -99,9 +99,13 @@ class Tasks::SwitchRoot < SingletonTask
|
||||
|
||||
# Given as a command-line option, from the bootloader (replacement for NixOS's stage-1)
|
||||
init_parameter = System.cmdline().grep(/^init=/).first
|
||||
unless init_parameter.nil?
|
||||
init_parameter = init_parameter.split("=", 2).last
|
||||
return init_parameter.rpartition("/").first
|
||||
if init_parameter == "init=/init" then
|
||||
$logger.info("Skipping '#{init_parameter}' cmdline parameter from quirky device...")
|
||||
else
|
||||
unless init_parameter.nil?
|
||||
init_parameter = init_parameter.split("=", 2).last
|
||||
return init_parameter.rpartition("/").first
|
||||
end
|
||||
end
|
||||
|
||||
# The default generation
|
||||
|
Loading…
Reference in New Issue
Block a user