]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
network-legacy/net-genrules.sh: use $name instead of $env{INTERFACE}
authorHarald Hoyer <harald@redhat.com>
Wed, 26 Feb 2020 15:53:47 +0000 (16:53 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 27 Feb 2020 12:49:21 +0000 (13:49 +0100)
The original behavior of $env{INTERFACE} was undocumented and changed in
the recent udev versions, breaking the ability to bring up networking
reliably. Switching to $name directive should fix this issue.

Related links:
 - systemd/systemd#12700 (udev PR)
 - systemd/systemd#12291 (related udev issue)
 - systemd/systemd#14935 (this issue, udev side)
 - #732 (this issue, dracut side)

Fixes: #732
modules.d/35network-legacy/net-genrules.sh

index d531bb564318b27c0d77610c0e4546f4d2603cb3..41ee93fb863d616fc9e95ad08b503082995bf3fe 100755 (executable)
@@ -65,9 +65,9 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
         bootdev=$(cat /tmp/net.bootdev)
     fi
 
-    ifup='/sbin/ifup $env{INTERFACE}'
+    ifup='/sbin/ifup $name'
 
-    runcmd="RUN+=\"/sbin/initqueue --name ifup-\$env{INTERFACE} --unique --onetime $ifup\""
+    runcmd="RUN+=\"/sbin/initqueue --name ifup-\$name --unique --onetime $ifup\""
 
     # We have some specific interfaces to handle
     if [ -n "${RAW_IFACES}${IFACES}" ]; then