Harald Hoyer 02dec6
From 79a17b0112995eb60c85c64d15070c52f213b28d Mon Sep 17 00:00:00 2001
Harald Hoyer 02dec6
From: Lubomir Rintel <lkundrak@v3.sk>
Harald Hoyer 02dec6
Date: Tue, 27 Nov 2018 15:30:48 +0100
Harald Hoyer 02dec6
Subject: [PATCH] network-manager: call the online hook for connected devices
Harald Hoyer 02dec6
Harald Hoyer 02dec6
Look for "connection-uuid" instead of "managed" to determine the devices
Harald Hoyer 02dec6
that are actually activated with a connection and call the online hook.
Harald Hoyer 02dec6
Harald Hoyer 02dec6
This fixes the anaconda-net root mount, which utilizes the online hook.
Harald Hoyer 02dec6
---
Harald Hoyer 02dec6
 modules.d/35network-manager/nm-run.sh | 3 ++-
Harald Hoyer 02dec6
 1 file changed, 2 insertions(+), 1 deletion(-)
Harald Hoyer 02dec6
Harald Hoyer 02dec6
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
Harald Hoyer 02dec6
index f6defa99..0f943631 100755
Harald Hoyer 02dec6
--- a/modules.d/35network-manager/nm-run.sh
Harald Hoyer 02dec6
+++ b/modules.d/35network-manager/nm-run.sh
Harald Hoyer 02dec6
@@ -9,8 +9,9 @@ fi
Harald Hoyer 02dec6
 for _i in /sys/class/net/*/
Harald Hoyer 02dec6
 do
Harald Hoyer 02dec6
     state=/run/NetworkManager/devices/$(cat $_i/ifindex)
Harald Hoyer 02dec6
-    grep -q managed=true $state 2>/dev/null || continue
Harald Hoyer 02dec6
+    grep -q connection-uuid= $state 2>/dev/null || continue
Harald Hoyer 02dec6
     ifname=$(basename $_i)
Harald Hoyer 02dec6
     sed -n 's/root-path/new_root_path/p' <$state >/tmp/dhclient.$ifname.dhcpopts
Harald Hoyer 02dec6
+    source_hook initqueue/online $ifname
Harald Hoyer 02dec6
     /sbin/netroot $ifname
Harald Hoyer 02dec6
 done
Harald Hoyer 02dec6