summaryrefslogtreecommitdiffstats
path: root/modules.d/99shutdown
diff options
context:
space:
mode:
Diffstat (limited to 'modules.d/99shutdown')
-rwxr-xr-xmodules.d/99shutdown/module-setup.sh8
-rwxr-xr-xmodules.d/99shutdown/shutdown.sh4
2 files changed, 7 insertions, 5 deletions
diff --git a/modules.d/99shutdown/module-setup.sh b/modules.d/99shutdown/module-setup.sh
index 2b99902..f53017f 100755
--- a/modules.d/99shutdown/module-setup.sh
+++ b/modules.d/99shutdown/module-setup.sh
@@ -17,9 +17,11 @@ install() {
inst_multiple umount poweroff reboot halt losetup stat sleep timeout
inst_multiple -o kexec
inst "$moddir/shutdown.sh" "$prefix/shutdown"
- [ -e "${initdir}/lib" ] || mkdir -m 0755 -p "${initdir}"/lib
- mkdir -m 0755 -p "${initdir}"/lib/dracut
- mkdir -m 0755 -p "${initdir}"/lib/dracut/hooks
+ mkdir -m 0755 -p "${initdir}"/var/lib/dracut/hooks
+
+ # symlink to old hooks location for compatibility
+ ln_r /var/lib/dracut/hooks /lib/dracut/hooks
+
for _d in $hookdirs shutdown shutdown-emergency; do
mkdir -m 0755 -p "${initdir}"/lib/dracut/hooks/"$_d"
done
diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh
index d611d44..d48d7d1 100755
--- a/modules.d/99shutdown/shutdown.sh
+++ b/modules.d/99shutdown/shutdown.sh
@@ -39,7 +39,7 @@ if [ "$ACTION" = "kexec" ] && ! command -v kexec > /dev/null 2>&1; then
fi
trap "emergency_shell --shutdown shutdown Signal caught!" 0
-getarg 'rd.break=pre-shutdown' && emergency_shell --shutdown pre-shutdown "Break before pre-shutdown"
+getargs 'rd.break=pre-shutdown' && emergency_shell --shutdown pre-shutdown "Break before pre-shutdown"
source_hook pre-shutdown
@@ -155,7 +155,7 @@ elif [ -x /oldroot/bin/plymouth ]; then
/oldroot/bin/plymouth --hide-splash
fi
-getarg 'rd.break=shutdown' && emergency_shell --shutdown shutdown "Break before shutdown"
+getargs 'rd.break=shutdown' && emergency_shell --shutdown shutdown "Break before shutdown"
case "$ACTION" in
reboot | poweroff | halt)