From: Lukas Nykryn Date: Tue, 7 Feb 2017 16:09:41 +0000 (+0100) Subject: network/ifup: write override file before dhcp_do X-Git-Tag: 045~26^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F201%2Fhead;p=thirdparty%2Fdracut.git network/ifup: write override file before dhcp_do Commit cf376023e6d0d4abd9816fa954bb917fc2557713 moved writing .resolv.conf and .override after dhcp_do, because dhcp_do was overwriting .resolv.conf. But .override does not have such problem and on the contrary dhcp_do reads .override file if it is present. So let\'s move it back. https://bugzilla.redhat.com/show_bug.cgi?id=1415004 --- diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh index 655ce93e5..8f6c1ba9d 100755 --- a/modules.d/40network/ifup.sh +++ b/modules.d/40network/ifup.sh @@ -376,6 +376,11 @@ for p in $(getargs ip=); do # If this option isn't directed at our interface, skip it [ -n "$dev" ] && [ "$dev" != "$netif" ] && continue + # Store config for later use + for i in ip srv gw mask hostname macaddr mtu dns1 dns2; do + eval '[ "$'$i'" ] && echo '$i'="$'$i'"' + done > /tmp/net.$netif.override + for autoopt in $(str_replace "$autoconf" "," " "); do case $autoopt in dhcp|on|any) @@ -397,11 +402,6 @@ for p in $(getargs ip=); do echo nameserver $s >> /tmp/net.$netif.resolv.conf done - # Store config for later use - for i in ip srv gw mask hostname macaddr mtu dns1 dns2; do - eval '[ "$'$i'" ] && echo '$i'="$'$i'"' - done > /tmp/net.$netif.override - if [ $ret -eq 0 ]; then > /tmp/net.${netif}.up