]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Revert "network/ifup.sh: do not default to dhcp, for interfaces without ip=..."
authorHarald Hoyer <harald@redhat.com>
Fri, 15 Jun 2012 09:56:05 +0000 (11:56 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 15 Jun 2012 09:56:05 +0000 (11:56 +0200)
This reverts commit ede0532c580fdbace548511b07857fb2e004b299.

modules.d/40network/ifup.sh

index 245b450e6fe2e20185e832812e6ff9e630775068..31eb9665d323af1a875cf19f153d15e328db5309 100755 (executable)
@@ -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