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

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