|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
From ddfea6b54cfa8f8f6c970d970318568c8a8a4c78 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
From: Chapman Flack <g2@anastigmatix.net>
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
Date: Wed, 2 Apr 2014 21:57:00 -0400
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
Subject: [PATCH] Break at switch_root only for bare rd.break
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
Previously, any rd.break=breakpoint would cause a break at the
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
given breakpoint and also at switch_root.
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
modules.d/99base/init.sh | 4 +++-
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
index 2364f4fccd..a1232eb5a4 100755
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
--- a/modules.d/99base/init.sh
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
+++ b/modules.d/99base/init.sh
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
@@ -353,7 +353,9 @@ wait_for_loginit
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
# remove helper symlink
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
[ -h /dev/root ] && rm -f -- /dev/root
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
-getarg rd.break -d rdbreak && emergency_shell -n switch_root "Break before switch_root"
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
+bv=$(getarg rd.break -d rdbreak) && [ -z "$bv" ] &&
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
+ emergency_shell -n switch_root "Break before switch_root"
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
+unset bv
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
info "Switching root"
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
--
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
1.9.3
|
|
Zbigniew Jędrzejewski-Szmek |
7f4a44 |
|