Blame SOURCES/0492-network-ifup-write-override-file-before-dhcp_do.patch

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