diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 14:01:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 14:01:36 +0000 |
commit | 70de5d4041249c1a0f597714398cc245f59495c6 (patch) | |
tree | ff491e31b95b662ca6c481ac49d1ca8a94c0226b /modules.d/99shutdown | |
parent | Adding debian version 060+5-8. (diff) | |
download | dracut-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-x | modules.d/99shutdown/module-setup.sh | 8 | ||||
-rwxr-xr-x | modules.d/99shutdown/shutdown.sh | 4 |
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) |