diff options
author | Krzysztof Sywula <krzysztof.m.sywula@intel.com> | 2014-01-15 11:27:04 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-16 12:05:48 +0000 |
commit | e917b074d65abae4d55af5f2651e73af4217b0c2 (patch) | |
tree | e433ec7e43479eac45cd79c6f9764782a66e5314 | |
parent | e4319b6dd0dbaed7a509cb82bc4251896f612c0f (diff) | |
download | poky-e917b074d65abae4d55af5f2651e73af4217b0c2.tar.gz |
initrdscripts: add $CMDLINE to init-live switch_root
init-live.sh: $CMDLINE variable should be provided to switch_root
to let user specify runlevel on grub command line.
Feeding with -c /dev/console as well as busybox switch_root enables that option.
(From OE-Core rev: 5a2f4feeaac4f9278fa0cf808c2f495f0c19324f)
Signed-off-by: Krzysztof Sywula <krzysztof.m.sywula@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-live.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh index bd259b9902..7e27f91f9e 100644 --- a/meta/recipes-core/initrdscripts/files/init-live.sh +++ b/meta/recipes-core/initrdscripts/files/init-live.sh | |||
@@ -89,7 +89,10 @@ boot_live_root() { | |||
89 | mount -n --move /dev ${ROOT_MOUNT}/dev | 89 | mount -n --move /dev ${ROOT_MOUNT}/dev |
90 | 90 | ||
91 | cd $ROOT_MOUNT | 91 | cd $ROOT_MOUNT |
92 | exec switch_root $ROOT_MOUNT /sbin/init | 92 | |
93 | # busybox switch_root supports -c option | ||
94 | exec switch_root -c /dev/console $ROOT_MOUNT /sbin/init $CMDLINE || | ||
95 | fatal "Couldn't switch_root, dropping to shell" | ||
93 | } | 96 | } |
94 | 97 | ||
95 | fatal() { | 98 | fatal() { |