network-legacy/net-genrules.sh: use $name instead of $env{INTERFACE}

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
master
Harald Hoyer 2020-02-26 16:53:47 +01:00
parent 4985aa8c6e
commit a8ba1c4e25
1 changed files with 2 additions and 2 deletions

View File

@ -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