]> git.ipfire.org Git - thirdparty/dracut.git/commit
network-manager: fix getting of ifname from the sysfs path
authorLubomir Rintel <lkundrak@v3.sk>
Wed, 30 Oct 2019 18:25:51 +0000 (19:25 +0100)
committerLukáš Nykrýn <lnykryn@redhat.com>
Tue, 5 Nov 2019 13:18:01 +0000 (14:18 +0100)
commit687e17aa7f2f40d21717be9a04302c749e139d4a
tree187394ed3980602a1b724fe6721d18b760627faf
parent3f4bbca7512ed78c08e147bfdf60beb71eafea11
network-manager: fix getting of ifname from the sysfs path

commit 5e0f8c8a4ced ('network-manager: remove useless use of basename')
somewhat carelessly didn't take into account that $_i has a slash at
the end which made the result of the ## substitution be just an empty
string.

The slash was put to the end of /sys/class/net/*/ to make sure we're only
iterating directories, but it's not strictly necessary. In an unlikely case
something else than a directory appears in /sys/class/net/, we'll already deal
with it gracefully. Remove it.

This fixes the TEST-30-ISCSI test.
modules.d/35network-manager/nm-run.sh