]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
35network-wicked: Run wicked early enough to unlock block devices
authorDaniel Molkentin <dmolkentin@suse.com>
Tue, 24 Nov 2020 18:52:23 +0000 (19:52 +0100)
committerDaniel Molkentin <daniel@molkentin.de>
Wed, 25 Nov 2020 17:21:39 +0000 (18:21 +0100)
modules.d/35network-wicked/module-setup.sh
modules.d/35network-wicked/wicked-run.sh

index 83e5e6cf33dd612153ccd9eb9b7e33500225cb12..43af4c9516c5050aa947f9bbb1438fe3a3c666e3 100755 (executable)
@@ -26,7 +26,7 @@ install() {
     inst_hook cmdline 99 "$moddir/wicked-config.sh"
 
     # Seems to not execute if in initqueue/settled
-    inst_hook pre-mount 99 "$moddir/wicked-run.sh"
+    inst_hook pre-udev 99 "$moddir/wicked-run.sh"
 
     inst_dir /etc/wicked/extensions
     inst_dir /usr/share/wicked/schema
@@ -51,6 +51,7 @@ install() {
 
     for unit in $wicked_units; do
         sed -i 's/^After=.*/After=dbus.service/g' $initdir/$unit
+        sed -i 's/^Before=\(.*\)/Before=\1 dracut-pre-udev.service/g' $initdir/$unit
         sed -i 's/^Wants=\(.*\)/Wants=\1 dbus.service/g' $initdir/$unit
         sed -i -e \
             '/^\[Unit\]/aDefaultDependencies=no\
index 7481258bd25fae586eee5f709a1f8f45e67ab6cc..eaf427ac98ee078e670bd7c0adb8422563b73384 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
+# ensure wickedd is running
 systemctl start wickedd
 # detection wrapper around ifup --ifconfig "final xml" all
 wicked bootstrap --ifconfig /tmp/dracut.xml all
-systemctl stop wickedd