From ef7c66b58b7947f1d06c9d8b8b170b5b84592c76 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 16 Jul 2011 23:34:43 -0400 Subject: 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 --- init | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'init') 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 -- cgit v1.2.3-24-g4f1b