]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
network-manager: call the online hook for connected devices
authorLubomir Rintel <lkundrak@v3.sk>
Tue, 27 Nov 2018 14:30:48 +0000 (15:30 +0100)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 30 Nov 2018 14:26:18 +0000 (15:26 +0100)
Look for "connection-uuid" instead of "managed" to determine the devices
that are actually activated with a connection and call the online hook.

This fixes the anaconda-net root mount, which utilizes the online hook.

modules.d/35network-manager/nm-run.sh

index f6defa993b6cd3a406f8c3f7ce61bde524edfd9c..0f943631631bcf48aab9d3b5d345bc61aa7b5180 100755 (executable)
@@ -9,8 +9,9 @@ fi
 for _i in /sys/class/net/*/
 do
     state=/run/NetworkManager/devices/$(cat $_i/ifindex)
-    grep -q managed=true $state 2>/dev/null || continue
+    grep -q connection-uuid= $state 2>/dev/null || continue
     ifname=$(basename $_i)
     sed -n 's/root-path/new_root_path/p' <$state >/tmp/dhclient.$ifname.dhcpopts
+    source_hook initqueue/online $ifname
     /sbin/netroot $ifname
 done