d4a4eb
From 96976e84e2c8544ab32026f05da8a35b9c48b2e5 Mon Sep 17 00:00:00 2001
d4a4eb
From: Lubomir Rintel <lkundrak@v3.sk>
d4a4eb
Date: Mon, 10 Jun 2019 16:05:49 +0200
d4a4eb
Subject: [PATCH] test/MULTINIC: correctly note activated devices when using
d4a4eb
 network-manager
d4a4eb
d4a4eb
The .did-setup files are not there. What is there is the NetworkManager
d4a4eb
connection files.
d4a4eb
d4a4eb
(cherry picked from commit 393fb1ac05ec3386a07d885e99985a647634803e)
d4a4eb
---
d4a4eb
 test/TEST-50-MULTINIC/client-init.sh | 10 ++++++++++
d4a4eb
 1 file changed, 10 insertions(+)
d4a4eb
d4a4eb
diff --git a/test/TEST-50-MULTINIC/client-init.sh b/test/TEST-50-MULTINIC/client-init.sh
d4a4eb
index 529379f0..7099dcf3 100755
d4a4eb
--- a/test/TEST-50-MULTINIC/client-init.sh
d4a4eb
+++ b/test/TEST-50-MULTINIC/client-init.sh
d4a4eb
@@ -105,7 +105,17 @@ export TERM=linux
d4a4eb
 export PS1='initramfs-test:\w\$ '
d4a4eb
 stty sane
d4a4eb
 echo "made it to the rootfs! Powering down."
d4a4eb
+for i in /sys/class/net/*/
d4a4eb
+do
d4a4eb
+    # booting with network-manager module
d4a4eb
+    state=/run/NetworkManager/devices/$(cat $i/ifindex)
d4a4eb
+    grep -q connection-uuid= $state 2>/dev/null || continue
d4a4eb
+    i=${i##*/}
d4a4eb
+    ip link show $i |grep -q master && continue
d4a4eb
+    IFACES+="$i "
d4a4eb
+done
d4a4eb
 for i in /run/initramfs/net.*.did-setup; do
d4a4eb
+    # booting with network-legacy module
d4a4eb
     [ -f "$i" ] || continue
d4a4eb
     strglobin "$i" ":*:*:*:*:" && continue
d4a4eb
     i=${i%.did-setup}
d4a4eb