dracut/0076-network-wait-for-all-required-interfaces-if-rd.needn.patch
Harald Hoyer 75f812af59 dracut-027-81.git20130531
- fix btrfs mount flags for /usr
- degrade message about missing tools for stripping
Resolves: rhbz#958519
- set environment vars DRACUT_SYSTEMD, NEWROOT in service file
Resolves: rhbz#963159
- don't add volatile swap partitions to host_devs
- add libssl.so.10 to make kdump work with fips mode
- readd selinux dracut module for kdump
- url-lib/url-lib.sh: turn off curl globbing
Resolves: rhbz#907497
- include btrfs-zero-log in the initramfs
Resolves: rhbz#963257
- proper NAME the network interfaces
Resolves: rhbz#965842
- install default font latarcyrheb-sun16
Resolves: rhbz#927564
- optionally install /etc/pcmcia/config.opts
Resolves: rhbz#920076
- fix ONBOOT for slaves, set TYPE=Bond for bonding
Resolves: rhbz#919001
- add nvme kernel module
Resolves: rhbz#910734
- add xfs_metadump
- selinux: load_policy script fix
- add hid-hyperv and hv-vmbus kernel modules
- add parameter rd.live.squashimg
Resolves: rhbz#789036 rhbz#782108
- wait for all required interfaces if "rd.neednet=1"
Resolves: rhbz#801829
- lvm: add tools for thin provisioning
Resolves: rhbz#921235
- ifcfg/write-ifcfg.sh: fixed ifcfg file generation
- do not wait for mpath* devices
Resolves: rhbz#969068
2013-05-31 10:01:36 +02:00

70 lines
2.6 KiB
Diff

From feaf30ffaa3365febe06ef3f0086778a6d364f0c Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 30 May 2013 11:38:23 +0200
Subject: [PATCH] network: wait for all required interfaces if "rd.neednet=1"
also set bootdev to the first configured interface, if missing
https://bugzilla.redhat.com/show_bug.cgi?id=801829
---
modules.d/40network/net-genrules.sh | 8 +++++---
modules.d/40network/parse-ip-opts.sh | 9 ++++++---
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh
index 8bf6a89..8f28c93 100755
--- a/modules.d/40network/net-genrules.sh
+++ b/modules.d/40network/net-genrules.sh
@@ -14,8 +14,10 @@ fix_bootif() {
echo $macaddr | sed 'y/ABCDEF/abcdef/'
}
+getargbool 0 rd.neednet && NEEDNET=1
+
# Don't continue if we don't need network
-if [ -z "$netroot" ] && [ ! -e "/tmp/net.ifaces" ] && ! getargbool 0 rd.neednet >/dev/null; then
+if [ -z "$netroot" ] && [ ! -e "/tmp/net.ifaces" ] && [ "$NEEDNET" != "1" ]; then
return
fi
@@ -73,13 +75,13 @@ fi
elif [ -n "$IFACES" ] ; then
for iface in $IFACES ; do
printf 'SUBSYSTEM=="net", ENV{INTERFACE}=="%s", RUN+="%s"\n' "$iface" "/sbin/initqueue --onetime $ifup"
- if [ "$bootdev" = "$iface" ]; then
+ if [ "$bootdev" = "$iface" ] || [ "$NEEDNET" = "1" ]; then
echo "[ -f /tmp/setup_net_${iface}.ok ]" >$hookdir/initqueue/finished/wait-$iface.sh
fi
done
for iface in $MASTER_IFACES; do
- if [ "$bootdev" = "$iface" ]; then
+ if [ "$bootdev" = "$iface" ] || [ "$NEEDNET" = "1" ]; then
echo "[ -f /tmp/setup_net_${iface}.ok ]" >$hookdir/initqueue/finished/wait-$iface.sh
fi
done
diff --git a/modules.d/40network/parse-ip-opts.sh b/modules.d/40network/parse-ip-opts.sh
index c7dc3ce..f64c936 100755
--- a/modules.d/40network/parse-ip-opts.sh
+++ b/modules.d/40network/parse-ip-opts.sh
@@ -54,6 +54,12 @@ fi
for p in $(getargs ip=); do
ip_to_var $p
+ # make first device specified the BOOTDEV
+ if [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then
+ BOOTDEV="$dev"
+ [ -n "$NEEDBOOTDEV" ] && warn "Setting bootdev to '$BOOTDEV'"
+ fi
+
# skip ibft since we did it above
[ "$autoconf" = "ibft" ] && continue
@@ -121,6 +127,3 @@ fi
# Store BOOTDEV and IFACES for later use
[ -n "$BOOTDEV" ] && echo $BOOTDEV > /tmp/net.bootdev
[ -n "$IFACES" ] && echo $IFACES > /tmp/net.ifaces
-
-# We need a ip= line for the configured bootdev=
-[ -n "$NEEDBOOTDEV" ] && [ -z "$BOOTDEVOK" ] && die "Bootdev Argument '$BOOTDEV' not found"