summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-07-17 05:34:43 +0200
committerDave Reisner <dreisner@archlinux.org>2011-10-01 05:25:04 +0200
commitef7c66b58b7947f1d06c9d8b8b170b5b84592c76 (patch)
tree2ef7256d07f087b75d7ec49bcdc54b0038edeec6
parent39d7c2925a71d631cdb7711898eaeefa93af816a (diff)
downloadmkinitcpio-ef7c66b58b7947f1d06c9d8b8b170b5b84592c76.tar.gz
mkinitcpio-ef7c66b58b7947f1d06c9d8b8b170b5b84592c76.tar.xz
init: support breaks before and after mounting root
Add in 'premount' and 'postmount' as trigger conditions, but also leave in the old 'y' value as a synonym for premount. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rw-r--r--init10
1 files changed, 8 insertions, 2 deletions
diff --git a/init b/init
index 8c8709c..4173f80 100644
--- a/init
+++ b/init
@@ -74,8 +74,9 @@ if [ -e "/hooks" ]; then
done
fi
-if [ "${break}" = "y" ]; then
- echo ":: Break requested, type 'exit' to resume operation"
+# honor the old behavior of break=y as a synonym for break=premount
+if [ "${break}" = "y" ] || [ "${break}" = "premount" ]; then
+ echo ":: Pre-mount break requested, type 'exit' to resume operation"
launch_interactive_shell
fi
@@ -100,6 +101,11 @@ elif [ ! -x "/new_root${init}" ]; then
launch_interactive_shell --exec
fi
+if [ "${break}" = "postmount" ]; then
+ echo ":: Post-mount break requested, type 'exit' to resume operation"
+ launch_interactive_shell
+fi
+
# Stop udevd if is running
if [ "${udevd_running}" -eq 1 ]; then
udevadm control --exit