18971c
From a603e1f3a625a6f3257e6eb30bccc545c7c6f376 Mon Sep 17 00:00:00 2001
18971c
From: Lukas Nykryn <lnykryn@redhat.com>
18971c
Date: Tue, 7 Feb 2017 17:09:41 +0100
18971c
Subject: [PATCH] network/ifup: write override file before dhcp_do
18971c
18971c
Commit cf376023e6d0d4abd9816fa954bb917fc2557713 moved writing .resolv.conf and .override
18971c
after dhcp_do, because dhcp_do was overwriting .resolv.conf. But .override does not have
18971c
such problem and on the contrary dhcp_do reads .override file if it is present. So let\'s
18971c
move it back.
18971c
18971c
https://bugzilla.redhat.com/show_bug.cgi?id=1415004
18971c
---
18971c
 modules.d/40network/ifup.sh | 10 +++++-----
18971c
 1 file changed, 5 insertions(+), 5 deletions(-)
18971c
18971c
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
18971c
index d7503c7f..b5c9ad2a 100755
18971c
--- a/modules.d/40network/ifup.sh
18971c
+++ b/modules.d/40network/ifup.sh
18971c
@@ -374,6 +374,11 @@ for p in $(getargs ip=); do
18971c
     [ "$use_bridge" != 'true' ] && \
18971c
     [ "$use_vlan" != 'true' ] && continue
18971c
 
18971c
+    # Store config for later use
18971c
+    for i in ip srv gw mask hostname macaddr mtu dns1 dns2; do
18971c
+        eval '[ "$'$i'" ] && echo '$i'="$'$i'"'
18971c
+    done > /tmp/net.$netif.override
18971c
+
18971c
     for autoopt in $(str_replace "$autoconf" "," " "); do
18971c
         case $autoopt in
18971c
             dhcp|on|any)
18971c
@@ -395,11 +400,6 @@ for p in $(getargs ip=); do
18971c
         echo nameserver $s >> /tmp/net.$netif.resolv.conf
18971c
     done
18971c
 
18971c
-    # Store config for later use
18971c
-    for i in ip srv gw mask hostname macaddr dns1 dns2 mtu; do
18971c
-        eval '[ "$'$i'" ] && echo '$i'="$'$i'"'
18971c
-    done > /tmp/net.$netif.override
18971c
-
18971c
     if [ $ret -eq 0 ]; then
18971c
         > /tmp/net.${netif}.up
18971c