dracut/0033-dracut-systemd-dracut-pre-pivot.sh-Break-at-switch_r.patch
Harald Hoyer b386772815 dracut-044-75
- fix for systemd >= 230
- git snapshot
2016-06-07 10:24:44 +02:00

30 lines
1.2 KiB
Diff

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