From: Harald Hoyer Date: Fri, 15 Jun 2012 09:56:05 +0000 (+0200) Subject: Revert "network/ifup.sh: do not default to dhcp, for interfaces without ip=..." X-Git-Tag: 020~89 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c9aa3cc950ebec597e51cbc0899777c2a99ca276;p=thirdparty%2Fdracut.git Revert "network/ifup.sh: do not default to dhcp, for interfaces without ip=..." This reverts commit ede0532c580fdbace548511b07857fb2e004b299. --- diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh index 245b450e6..31eb9665d 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