From ab3bb7e1b5955977eac1646f4e06fb4778ff48d1 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 25 2017 13:29:42 +0000 Subject: import dracut-033-463.el7_3.1 --- diff --git a/SOURCES/0492-network-ifup-write-override-file-before-dhcp_do.patch b/SOURCES/0492-network-ifup-write-override-file-before-dhcp_do.patch new file mode 100644 index 0000000..442bdb4 --- /dev/null +++ b/SOURCES/0492-network-ifup-write-override-file-before-dhcp_do.patch @@ -0,0 +1,43 @@ +From a603e1f3a625a6f3257e6eb30bccc545c7c6f376 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Tue, 7 Feb 2017 17:09:41 +0100 +Subject: [PATCH] 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 +--- + modules.d/40network/ifup.sh | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh +index d7503c7..b5c9ad2 100755 +--- a/modules.d/40network/ifup.sh ++++ b/modules.d/40network/ifup.sh +@@ -374,6 +374,11 @@ for p in $(getargs ip=); do + [ "$use_bridge" != 'true' ] && \ + [ "$use_vlan" != 'true' ] && 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) +@@ -395,11 +400,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 dns1 dns2 mtu; do +- eval '[ "$'$i'" ] && echo '$i'="$'$i'"' +- done > /tmp/net.$netif.override +- + if [ $ret -eq 0 ]; then + > /tmp/net.${netif}.up + diff --git a/SPECS/dracut.spec b/SPECS/dracut.spec index e3a1e05..a066981 100644 --- a/SPECS/dracut.spec +++ b/SPECS/dracut.spec @@ -10,7 +10,7 @@ Name: dracut Version: 033 -Release: 463%{?dist} +Release: 463%{?dist}.1 Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -491,6 +491,7 @@ Patch459: 0459-fcoe-only-install-etc-hba.conf-it-it-exists.patch Patch460: 0460-network-parse-ip-opts-be-more-liberal-to-multiple-ip.patch Patch461: 0461-network-fix-dhcp-classless_static_routes.patch Patch462: 0462-network-do-not-check-firmware-boot-selected-flag.patch +Patch463: 0492-network-ifup-write-override-file-before-dhcp_do.patch BuildRequires: bash git @@ -920,6 +921,10 @@ rm -rf -- $RPM_BUILD_ROOT %endif %changelog +* Wed Apr 26 2017 Lukáš Nykrýn - 033-463.1 +- network/ifup: write override file before dhcp_do +Resolves: rhbz#1415004 + * Wed Oct 05 2016 Lukáš Nykrýn - 033-463 - network: do not check "firmware boot selected flag" Resolves: rhbz#1380581