]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Break at switch_root only for bare rd.break
authorChapman Flack <g2@anastigmatix.net>
Thu, 3 Apr 2014 01:57:00 +0000 (21:57 -0400)
committerHarald Hoyer <harald@redhat.com>
Thu, 3 Apr 2014 06:56:52 +0000 (08:56 +0200)
Previously, any rd.break=breakpoint would cause a break at the
given breakpoint and also at switch_root.

modules.d/99base/init.sh

index 2364f4fccd9eca9fc55b75cc8b37d18d9780075a..a1232eb5a40d721c814b70786290abd62365dcc3 100755 (executable)
@@ -353,7 +353,9 @@ wait_for_loginit
 # remove helper symlink
 [ -h /dev/root ] && rm -f -- /dev/root
 
-getarg rd.break -d rdbreak && emergency_shell -n switch_root "Break before switch_root"
+bv=$(getarg rd.break -d rdbreak) && [ -z "$bv" ] &&
+    emergency_shell -n switch_root "Break before switch_root"
+unset bv
 info "Switching root"