Blame 0033-dracut-systemd-dracut-pre-pivot.sh-Break-at-switch_r.patch

Harald Hoyer b38677
From 556ff7c76a5c365889ea9972c1878eaf7073bde8 Mon Sep 17 00:00:00 2001
Harald Hoyer b38677
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer b38677
Date: Mon, 7 Mar 2016 12:38:23 +0100
Harald Hoyer b38677
Subject: [PATCH] dracut-systemd/dracut-pre-pivot.sh: Break at switch_root only
Harald Hoyer b38677
 for bare rd.break
Harald Hoyer b38677
Harald Hoyer b38677
similar to commit ddfea6b54cfa8f8f6c970d970318568c8a8a4c78
Harald Hoyer b38677
Harald Hoyer b38677
Previously, any rd.break=breakpoint would cause a break at the
Harald Hoyer b38677
given breakpoint and also at switch_root.
Harald Hoyer b38677
---
Harald Hoyer b38677
 modules.d/98dracut-systemd/dracut-pre-pivot.sh | 4 +++-
Harald Hoyer b38677
 1 file changed, 3 insertions(+), 1 deletion(-)
Harald Hoyer b38677
Harald Hoyer b38677
diff --git a/modules.d/98dracut-systemd/dracut-pre-pivot.sh b/modules.d/98dracut-systemd/dracut-pre-pivot.sh
Harald Hoyer b38677
index a07cf3e..cc70e3c 100755
Harald Hoyer b38677
--- a/modules.d/98dracut-systemd/dracut-pre-pivot.sh
Harald Hoyer b38677
+++ b/modules.d/98dracut-systemd/dracut-pre-pivot.sh
Harald Hoyer b38677
@@ -18,7 +18,9 @@ source_hook pre-pivot
Harald Hoyer b38677
 getarg 'rd.break=cleanup' 'rdbreak=cleanup' && emergency_shell -n cleanup "Break cleanup"
Harald Hoyer b38677
 source_hook cleanup
Harald Hoyer b38677
 
Harald Hoyer b38677
-getarg rd.break -d rdbreak && emergency_shell -n switch_root "Break before switch_root"
Harald Hoyer b38677
+_bv=$(getarg rd.break -d rdbreak) && [ -z "$_bv" ] &&
Harald Hoyer b38677
+    emergency_shell -n switch_root "Break before switch_root"
Harald Hoyer b38677
+unset _bv
Harald Hoyer b38677
 
Harald Hoyer b38677
 # remove helper symlink
Harald Hoyer b38677
 [ -h /dev/root ] && rm -f -- /dev/root