From de51074053cafa8baa56204cde5a3642468f15e6 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Sat, 9 Jun 2012 08:44:27 +0200 Subject: [PATCH] init: run late/cleanup hooks before checking for init --- usr/share/archboot/base/init | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/usr/share/archboot/base/init b/usr/share/archboot/base/init index ca55720be..e9a85d735 100755 --- a/usr/share/archboot/base/init +++ b/usr/share/archboot/base/init @@ -57,6 +57,9 @@ else # Mount root at /new_root ${mount_handler:-default_mount_handler} /new_root + run_hookfunctions 'run_latehook' 'late hook' $LATEHOOKS + run_hookfunctions 'run_cleanuphook' 'cleanup hook' $CLEANUPHOOKS + if [ "$(stat -c %D /)" = "$(stat -c %D /new_root)" ]; then # Nothing got mounted on /new_root. This is the end, we don't know what to do anymore # We fall back into a shell, but the shell has now PID 1 @@ -74,10 +77,6 @@ else launch_interactive_shell --exec fi - run_hookfunctions 'run_latehook' 'late hook' $LATEHOOKS - - run_hookfunctions 'run_cleanuphook' 'cleanup hook' $CLEANUPHOOKS - if [ "${break}" = "postmount" ]; then echo ":: Post-mount break requested, type 'exit' to resume operation" launch_interactive_shell