test/MULTINIC: correctly note activated devices when using network-manager
authorLubomir Rintel <lkundrak@v3.sk>
Mon, 10 Jun 2019 14:05:49 +0000 (16:05 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 19 Jul 2019 14:21:56 +0000 (16:21 +0200)
The .did-setup files are not there. What is there is the NetworkManager
connection files.

test/TEST-50-MULTINIC/client-init.sh

index 529379f..7099dcf 100755 (executable)
@@ -105,7 +105,17 @@ export TERM=linux
 export PS1='initramfs-test:\w\$ '
 stty sane
 echo "made it to the rootfs! Powering down."
+for i in /sys/class/net/*/
+do
+    # booting with network-manager module
+    state=/run/NetworkManager/devices/$(cat $i/ifindex)
+    grep -q connection-uuid= $state 2>/dev/null || continue
+    i=${i##*/}
+    ip link show $i |grep -q master && continue
+    IFACES+="$i "
+done
 for i in /run/initramfs/net.*.did-setup; do
+    # booting with network-legacy module
     [ -f "$i" ] || continue
     strglobin "$i" ":*:*:*:*:" && continue
     i=${i%.did-setup}