dracut/0027-Revert-network-ifup.sh-do-not-default-to-dhcp-for-in.patch
Harald Hoyer d1bf89c255 dracut-019-40.git20120618
- new upstream version
2012-06-18 20:06:19 +02:00

34 lines
1.0 KiB
Diff

From c9aa3cc950ebec597e51cbc0899777c2a99ca276 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 15 Jun 2012 11:56:05 +0200
Subject: [PATCH] Revert "network/ifup.sh: do not default to dhcp, for
interfaces without ip=..."
This reverts commit ede0532c580fdbace548511b07857fb2e004b299.
---
modules.d/40network/ifup.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index 245b450..31eb966 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -216,6 +216,17 @@ if [ "$netif" = "$vlanname" ] && [ ! -e /tmp/net.$vlanname.up ]; then
ip link add dev "$vlanname" link "$phydevice" type vlan id "$(get_vid $vlanname; echo $?)"
fi
+# No ip lines default to dhcp
+ip=$(getarg ip)
+
+if [ -z "$ip" ]; then
+ if [ "$netroot" = "dhcp6" ]; then
+ do_dhcp -6
+ else
+ do_dhcp -4
+ fi
+fi
+
# Specific configuration, spin through the kernel command line
# looking for ip= lines
for p in $(getargs ip=); do