summaryrefslogtreecommitdiffstats
path: root/modules.d/99shutdown
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 14:01:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 14:01:36 +0000
commit70de5d4041249c1a0f597714398cc245f59495c6 (patch)
treeff491e31b95b662ca6c481ac49d1ca8a94c0226b /modules.d/99shutdown
parentAdding debian version 060+5-8. (diff)
downloaddracut-70de5d4041249c1a0f597714398cc245f59495c6.tar.xz
dracut-70de5d4041249c1a0f597714398cc245f59495c6.zip
Merging upstream version 102.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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)