summaryrefslogtreecommitdiffstats
path: root/modules.d/99shutdown/module-setup.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xmodules.d/99shutdown/module-setup.sh8
1 files changed, 5 insertions, 3 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