summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-06-07 22:47:23 +0200
committerDave Reisner <dreisner@archlinux.org>2012-06-07 22:54:31 +0200
commitdc1b198b0cce1d2da3acd47a442ad64ed92bcad9 (patch)
tree4a2c46f0e3e1a972cad78a708eadf8700e2f0cc6
parent0cad767e20f71b53f40b8b68df761ce4535e08e5 (diff)
downloadmkinitcpio-dc1b198b0cce1d2da3acd47a442ad64ed92bcad9.tar.gz
mkinitcpio-dc1b198b0cce1d2da3acd47a442ad64ed92bcad9.tar.xz
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>
-rw-r--r--init7
1 files changed, 3 insertions, 4 deletions
diff --git a/init b/init
index d77c545..0a6c494 100644
--- a/init
+++ b/init
@@ -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