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