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