]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
merge "cleanup" and "pre-pivot-cleanup" hooks
authorHarald Hoyer <harald@redhat.com>
Mon, 23 Apr 2012 09:31:32 +0000 (11:31 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 23 Apr 2012 09:32:45 +0000 (11:32 +0200)
README.modules
dracut-functions.sh
dracut.asc
dracut.cmdline.7.asc
modules.d/40network/module-setup.sh
modules.d/90crypt/module-setup.sh
modules.d/90multipath/module-setup.sh
modules.d/95iscsi/module-setup.sh
modules.d/95nfs/module-setup.sh
modules.d/99base/init.sh

index 188d01196e09add8bb9049b17b67441439a92657..64d533fbf9ebb775791149965827633c58fc5ece 100644 (file)
@@ -105,7 +105,7 @@ init has the following hook points to inject scripts:
 /lib/dracut/hooks/pre-pivot/*.sh
    scripts to run before latter initramfs cleanups
 
-/lib/dracut/hooks/pre-pivot-cleanup/*.sh
+/lib/dracut/hooks/cleanup/*.sh
    scripts to run before the real init is executed and the initramfs
    disappears
    All processes started before should be killed here.
index ccf3ba64adfafe8b07f82b2e0635146183871696..ff4e16d97c56252d61f941c953215f5aa753613a 100755 (executable)
@@ -36,8 +36,8 @@ fi
 [[ $hookdirs ]] || {
     hookdirs="cmdline pre-udev pre-trigger netroot "
     hookdirs+="initqueue initqueue/settled initqueue/online initqueue/finished initqueue/timeout "
-    hookdirs+="pre-mount pre-pivot pre-pivot-cleanup mount "
-    hookdirs+="emergency shutdown-emergency shutdown cleanup "
+    hookdirs+="pre-mount pre-pivot cleanup mount "
+    hookdirs+="emergency shutdown-emergency shutdown "
     export hookdirs
 }
 
index 9621db2af1763194d8787cd1d4545bcf2e39cdd1..a6e050dab43eff1a301066f0a48d0bc58201982b 100644 (file)
@@ -854,11 +854,11 @@ This hook is mainly to mount the real root device.
 
 === Hook: pre-pivot
 
-This hook is called before pre-pivot-cleanup hook, This is a good place for
+This hook is called before cleanup hook, This is a good place for
 actions other than cleanups which need to be called before pivot.
 
 
-=== Hook: pre-pivot-cleanup
+=== Hook: cleanup
 
 This hook is the last hook and is called before init finally switches root to
 the real root device. This is a good place to clean up and kill processes not
index 76db6516d44226b4104a6c2ec7cdcc812a4120f8..61cd13955e256bd6fd92ffbdc8db1f9ae21b0127 100644 (file)
@@ -105,7 +105,7 @@ Debug
 **rd.break**::
     drop to a shell at the end
 
-**rd.break=**_{cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot|pre-pivot-cleanup}_::
+**rd.break=**_{cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot|cleanup}_::
     drop to a shell on defined breakpoint
 
 **rd.udev.info**::
index c2ad815632f0624d25ffe88223d16360bb6ca38d..d49b59479e055255f06d01c8b70fc3ec0b6e2c4e 100755 (executable)
@@ -86,7 +86,7 @@ install() {
     inst_hook cmdline 97 "$moddir/parse-bridge.sh"
     inst_hook cmdline 98 "$moddir/parse-ip-opts.sh"
     inst_hook cmdline 99 "$moddir/parse-ifname.sh"
-    inst_hook pre-pivot-cleanup 10 "$moddir/kill-dhclient.sh"
+    inst_hook cleanup 10 "$moddir/kill-dhclient.sh"
 
     _arch=$(uname -m)
 
index 4a66516277f2419277aba34e18d59320614a5f7b..5082434aaf95a26f64b7e198c2154b38bcddba26 100755 (executable)
@@ -48,7 +48,7 @@ install() {
     inst "$moddir"/probe-keydev.sh /sbin/probe-keydev
     inst_hook cmdline 10 "$moddir/parse-keydev.sh"
     inst_hook cmdline 30 "$moddir/parse-crypt.sh"
-    inst_hook pre-pivot-cleanup 30 "$moddir/crypt-cleanup.sh"
+    inst_hook cleanup 30 "$moddir/crypt-cleanup.sh"
     inst_simple /etc/crypttab
     inst "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh"
 }
index f044f33032169775f88159269341717f0c74f2b3..2bc1b41274b67121cad86bcd3060b1c84416c86b 100755 (executable)
@@ -70,7 +70,7 @@ install() {
     inst_libdir_file "multipath/*"
 
     inst_hook pre-trigger 02 "$moddir/multipathd.sh"
-    inst_hook pre-pivot-cleanup   02 "$moddir/multipathd-stop.sh"
+    inst_hook cleanup   02 "$moddir/multipathd-stop.sh"
     inst_rules 40-multipath.rules
 }
 
index a001a2896a781b8a79add7ce798b5130f1b52a28..2f343ee85207ec798d59d790f6dc033bc435af21 100755 (executable)
@@ -63,7 +63,7 @@ install() {
     inst hostname
     inst iscsi-iname
     inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh"
-    inst_hook pre-pivot-cleanup 90 "$moddir/cleanup-iscsi.sh"
+    inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh"
     inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot"
     inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh"
 }
index 3587bddad6305679fb31897cb14088920f0eda3f..1d62e95ac37f2da7170f3ccabbc806942a44bf56 100755 (executable)
@@ -58,7 +58,7 @@ install() {
 
     inst_hook cmdline 90 "$moddir/parse-nfsroot.sh"
     inst_hook pre-udev 99 "$moddir/nfs-start-rpc.sh"
-    inst_hook pre-pivot-cleanup 99 "$moddir/nfsroot-cleanup.sh"
+    inst_hook cleanup 99 "$moddir/nfsroot-cleanup.sh"
     inst "$moddir/nfsroot.sh" "/sbin/nfsroot"
     inst "$moddir/nfs-lib.sh" "/lib/nfs-lib.sh"
     mkdir -m 0755 -p "$initdir/var/lib/nfs/rpc_pipefs"
index aea739f98c3441d5d2e04dbcd82cea259c7ac6f6..cba2e1abff46233d111e3d8444d815b2a07854d4 100755 (executable)
@@ -230,8 +230,8 @@ getarg 'rd.break=pre-pivot' 'rdbreak=pre-pivot' && emergency_shell -n pre-pivot
 source_hook pre-pivot
 
 # pre pivot cleanup scripts are sourced just before we switch over to the new root.
-getarg 'rd.break=pre-pivot-cleanup' 'rdbreak=pre-pivot-cleanup' && emergency_shell -n pre-pivot-cleanup "Break pre-pivot-cleanup"
-source_hook pre-pivot-cleanup
+getarg 'rd.break=cleanup' 'rdbreak=cleanup' && emergency_shell -n cleanup "Break cleanup"
+source_hook cleanup
 
 # By the time we get here, the root filesystem should be mounted.
 # Try to find init. 
@@ -332,7 +332,6 @@ wait_for_loginit
 getarg rd.break rdbreak && emergency_shell -n switch_root "Break before switch_root"
 info "Switching root"
 
-source_hook cleanup
 
 unset PS4