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