mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
init: run late/cleanup hooks before checking for init
This commit is contained in:
parent
23a5b6abeb
commit
de51074053
1 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue