|
|
17094c |
From 07e7e84ebea1d76aeaa77d097b34503ec3c8f2e1 Mon Sep 17 00:00:00 2001
|
|
|
17094c |
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
|
17094c |
Date: Wed, 30 Oct 2019 19:25:51 +0100
|
|
|
17094c |
Subject: [PATCH] network-manager: fix getting of ifname from the sysfs path
|
|
|
17094c |
|
|
|
17094c |
commit 5e0f8c8a4ced ('network-manager: remove useless use of basename')
|
|
|
17094c |
somewhat carelessly didn't take into account that $_i has a slash at
|
|
|
17094c |
the end which made the result of the ## substitution be just an empty
|
|
|
17094c |
string.
|
|
|
17094c |
|
|
|
17094c |
The slash was put to the end of /sys/class/net/*/ to make sure we're only
|
|
|
17094c |
iterating directories, but it's not strictly necessary. In an unlikely case
|
|
|
17094c |
something else than a directory appears in /sys/class/net/, we'll already deal
|
|
|
17094c |
with it gracefully. Remove it.
|
|
|
17094c |
|
|
|
17094c |
This fixes the TEST-30-ISCSI test.
|
|
|
17094c |
|
|
|
17094c |
(cherry picked from commit 687e17aa7f2f40d21717be9a04302c749e139d4a)
|
|
|
17094c |
|
|
|
17094c |
Resolves: #1826061
|
|
|
17094c |
---
|
|
|
17094c |
modules.d/35network-manager/nm-run.sh | 2 +-
|
|
|
17094c |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
17094c |
|
|
|
17094c |
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
|
|
|
17094c |
index a539d5b2..b33e0992 100755
|
|
|
17094c |
--- a/modules.d/35network-manager/nm-run.sh
|
|
|
17094c |
+++ b/modules.d/35network-manager/nm-run.sh
|
|
|
17094c |
@@ -6,7 +6,7 @@ else
|
|
|
17094c |
/usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon
|
|
|
17094c |
fi
|
|
|
17094c |
|
|
|
17094c |
-for _i in /sys/class/net/*/
|
|
|
17094c |
+for _i in /sys/class/net/*
|
|
|
17094c |
do
|
|
|
17094c |
state=/run/NetworkManager/devices/$(cat $_i/ifindex)
|
|
|
17094c |
grep -q connection-uuid= $state 2>/dev/null || continue
|
|
|
17094c |
|