Skip to content

Commit

Permalink
35network-legacy: only skip waiting for interfaces if netroot is set
Browse files Browse the repository at this point in the history
Commmit 8a33e52e2f94 assumes that dracut's work is done if a root device
is found. This holds usually for booting computers, but it may be wrong
for other environments.

Only short-cut the waiting if $netroot is also set.

Fixes: 8a33e52e2f94 ("network: stop waiting for interfaces if root device is present")
References: bsc#1152006

Resolves: rhbz#2115199
  • Loading branch information
mwilck authored and pvalena committed Oct 19, 2022
1 parent ee0bba8 commit 934e69b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules.d/35network-legacy/net-genrules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh

for iface in $IFACES; do
if [ "$bootdev" = "$iface" ] || [ "$NEEDNET" = "1" ]; then
echo "${DRACUT_SYSTEMD+systemctl is-active initrd-root-device.target || }[ -f /tmp/net.${iface}.did-setup ]" >$hookdir/initqueue/finished/wait-$iface.sh
if [ -n "$netroot" ] && [ -n "$DRACUT_SYSTEMD" ]; then
echo "systemctl is-active initrd-root-device.target || [ -f /tmp/net.${iface}.did-setup ]"
else
echo "[ -f /tmp/net.${iface}.did-setup ]"
fi >$hookdir/initqueue/finished/wait-$iface.sh
fi
done
# Default: We don't know the interface to use, handle all
Expand Down

0 comments on commit 934e69b

Please sign in to comment.