mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 12:00:37 +02:00
init: add support for early, late and cleanup hooks
This commit is contained in:
parent
4ccbcedad5
commit
f1499cfa4b
1 changed files with 7 additions and 2 deletions
|
@ -29,10 +29,11 @@ for d in ${disablehooks//,/ }; do
|
||||||
[ -e "/hooks/$d" ] && chmod 644 "/hooks/$d"
|
[ -e "/hooks/$d" ] && chmod 644 "/hooks/$d"
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -n "${earlymodules//[[:space:]]}" ] && modprobe -qab ${earlymodules//,/ }
|
|
||||||
|
|
||||||
. /config
|
. /config
|
||||||
|
|
||||||
|
run_hookfunctions 'run_earlyhook' 'early hook' $EARLYHOOKS
|
||||||
|
|
||||||
|
[ -n "${earlymodules//[[:space:]]}" ] && modprobe -qab ${earlymodules//,/ }
|
||||||
[ -n "${MODULES//[[:space:]]}" ] && modprobe -qab $MODULES
|
[ -n "${MODULES//[[:space:]]}" ] && modprobe -qab $MODULES
|
||||||
|
|
||||||
# If rootdelay is empty or not a non-negative integer, set it to 10
|
# If rootdelay is empty or not a non-negative integer, set it to 10
|
||||||
|
@ -78,6 +79,10 @@ else
|
||||||
launch_interactive_shell --exec
|
launch_interactive_shell --exec
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
run_hookfunctions 'run_latehook' 'late hook' $LATEHOOKS
|
||||||
|
|
||||||
|
run_hookfunctions 'run_cleanuphook' 'cleanup hook' $CLEANUPHOOKS
|
||||||
|
|
||||||
# mount /usr if it exists
|
# mount /usr if it exists
|
||||||
realtab=/new_root/etc/fstab
|
realtab=/new_root/etc/fstab
|
||||||
if [ -f "$realtab" ]; then
|
if [ -f "$realtab" ]; then
|
||||||
|
|
Loading…
Reference in a new issue