From f4567e887dd480a8774829595b74804607e7f6ec Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Aug 19 2020 14:22:49 +0000 Subject: network-manager: call the online hook for connected devices 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. (cherry picked from commit 79a17b0112995eb60c85c64d15070c52f213b28d) patch_name: 0038.patch present_in_specfile: true location_in_specfile: 38 squash_commits: true --- diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh index f6defa9..0f94363 100755 --- a/modules.d/35network-manager/nm-run.sh +++ b/modules.d/35network-manager/nm-run.sh @@ -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