Permalink
Browse files

init: run late/cleanup hooks before checking for init

This fixes a bug that made it impossible for systemd to be booted with a
separate /usr partition.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
  • Loading branch information...
1 parent 0cad767 commit dc1b198b0cce1d2da3acd47a442ad64ed92bcad9 @falconindy committed Jun 7, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 init
View
@@ -49,6 +49,9 @@ fsck_root
# 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
+
init=${init:-/sbin/init}
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
@@ -67,10 +70,6 @@ elif [ ! -x "/new_root${init}" ]; then
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

0 comments on commit dc1b198

Please sign in to comment.