add "initqueue/*" to hookdirs and create them in dracut itsself
authorHarald Hoyer <harald@redhat.com>
Fri, 2 Mar 2012 13:46:11 +0000 (14:46 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 8 Mar 2012 10:00:29 +0000 (11:00 +0100)
now we can just use
    inst_hook initqueue/settled 99 "$moddir/pollcdrom.sh"

dracut-functions.sh
dracut.sh
modules.d/99base/module-setup.sh

index 5cf24a7..05c1d3a 100755 (executable)
@@ -34,8 +34,10 @@ fi
 
 # export standard hookdirs
 [[ $hookdirs ]] || {
-    hookdirs="cmdline pre-udev pre-trigger netroot initqueue pre-mount"
-    hookdirs+=" pre-pivot mount emergency shutdown-emergency shutdown cleanup"
+    hookdirs="cmdline pre-udev pre-trigger netroot "
+    hookdirs+="initqueue initqueue/settled initqueue/finished initqueue/timeout "
+    hookdirs+="pre-mount pre-pivot mount "
+    hookdirs+="emergency shutdown-emergency shutdown cleanup "
     export hookdirs
 }
 
index 88691ae..417008c 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -674,6 +674,9 @@ fi
 
 if [[ $kernel_only != yes ]]; then
     mkdir -p "${initdir}/etc/cmdline.d"
+    for _d in $hookdirs; do
+        mkdir -m 0755 -p ${initdir}/lib/dracut/hooks/$_d
+    done
 fi
 
 mkdir -p "$initdir/.kernelmodseen"
index fd92644..5a97770 100755 (executable)
@@ -33,10 +33,6 @@ install() {
     [ -e "${initdir}/lib" ] || mkdir -m 0755 -p ${initdir}/lib
     mkdir -m 0755 -p ${initdir}/lib/dracut
     mkdir -m 0755 -p ${initdir}/lib/dracut/hooks
-    for _d in $hookdirs emergency \
-        initqueue initqueue/timeout initqueue/finished initqueue/settled; do
-        mkdir -m 0755 -p ${initdir}/lib/dracut/hooks/$_d
-    done
 
     mkdir -p ${initdir}/tmp