Blame SOURCES/0254-network-don-t-use-ifup-m.patch

64b87c
From 00c118a93a154d8ee7469331da2868db6c76fcd2 Mon Sep 17 00:00:00 2001
64b87c
From: Harald Hoyer <harald@redhat.com>
64b87c
Date: Thu, 2 Jul 2015 11:32:08 +0200
64b87c
Subject: [PATCH] network: don't use "ifup -m"
64b87c
64b87c
"ifup -m" was thought to be used by humans in the emergency shell.
64b87c
Using it programatically shows some other flaw in the execution logic.
64b87c
64b87c
Also, "ifup -m" was configuring the interface multiple times on "add"
64b87c
and "change" uevent, because the "$netif.did-setup" test was not
64b87c
executed.
64b87c
64b87c
(cherry picked from commit 7cca5efdcea4f1431331cf7663fc6fb48a365cdf)
64b87c
---
64b87c
 modules.d/40network/ifup.sh         | 3 ++-
64b87c
 modules.d/40network/net-genrules.sh | 1 -
64b87c
 2 files changed, 2 insertions(+), 2 deletions(-)
64b87c
64b87c
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
64b87c
index bd7db02..3cff725 100755
64b87c
--- a/modules.d/40network/ifup.sh
64b87c
+++ b/modules.d/40network/ifup.sh
64b87c
@@ -82,9 +82,10 @@ fi
64b87c
 # disable manual ifup while netroot is set for simplifying our logic
64b87c
 # in netroot case we prefer netroot to bringup $netif automaticlly
64b87c
 [ -n "$2" -a "$2" = "-m" ] && [ -z "$netroot" ] && manualup="$2"
64b87c
-[ -z "$netroot" ] && [ -z "$manualup" ] && exit 0
64b87c
+
64b87c
 if [ -n "$manualup" ]; then
64b87c
     >/tmp/net.$netif.manualup
64b87c
+    rm -f /tmp/net.${netif}.did-setup
64b87c
 else
64b87c
     [ -e /tmp/net.${netif}.did-setup ] && exit 0
64b87c
     [ -e /sys/class/net/$netif/address ] && \
64b87c
diff --git a/modules.d/40network/net-genrules.sh b/modules.d/40network/net-genrules.sh
64b87c
index 3664984..750a4d7 100755
64b87c
--- a/modules.d/40network/net-genrules.sh
64b87c
+++ b/modules.d/40network/net-genrules.sh
64b87c
@@ -55,7 +55,6 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
64b87c
     fi
64b87c
 
64b87c
     ifup='/sbin/ifup $env{INTERFACE}'
64b87c
-    [ -z "$netroot" ] && ifup="$ifup -m"
64b87c
 
64b87c
     runcmd="RUN+=\"/sbin/initqueue --name ifup-\$env{INTERFACE} --unique --onetime $ifup\""
64b87c