]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-pre-pivot: call udevadm settle one last time
authorHarald Hoyer <harald@redhat.com>
Tue, 16 Jun 2015 11:28:48 +0000 (13:28 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 16 Jun 2015 11:58:05 +0000 (13:58 +0200)
Some Hardware needs initialization and killing modprobe or modprobe
scripts would harm the process.

modules.d/98systemd/dracut-pre-pivot.service
modules.d/98systemd/dracut-pre-pivot.sh

index d7c7b1d785d454ef36cb45bba6d02f367a7aede1..f45390061f35440c0121e5014a460920f5bedfc4 100644 (file)
@@ -16,13 +16,6 @@ Before=initrd-cleanup.service
 Wants=remote-fs.target
 After=remote-fs.target
 ConditionPathExists=/etc/initrd-release
-ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-pivot
-ConditionDirectoryNotEmpty=|/lib/dracut/hooks/cleanup
-ConditionKernelCommandLine=|rd.break=pre-pivot
-ConditionKernelCommandLine=|rd.break=cleanup
-ConditionKernelCommandLine=|rd.break
-ConditionPathExists=|/dev/root
-ConditionPathExists=|/dev/nfs
 
 [Service]
 Environment=DRACUT_SYSTEMD=1
index e62a1cecb6eb83d30fbcdbe4e62c35d102767745..afe34668da05e18f228b16c205caf663c4eb846c 100755 (executable)
@@ -26,4 +26,16 @@ getarg rd.break -d rdbreak && emergency_shell -n switch_root "Break before switc
 [ -h /dev/root ] && rm -f -- /dev/root
 [ -h /dev/nfs ] && rm -f -- /dev/nfs
 
+udevadm settle
+
+cnt=0
+while ! udevadm settle --timeout=0; do
+    info "udev still not settled. Waiting."
+    udevadm settle
+    cnt=$(($cnt+1))
+    [ $cnt -gt 10 ] && break
+done
+
+udevadm control --exit
+
 exit 0