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