Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 3fd6f6643c923f16502719ae976124bb > files > 3

initscripts-9.41-14.mga3.src.rpm

From 36deb4967b8080d0a92177696958c991c08cd976 Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Wed, 27 Feb 2013 11:06:00 +0000
Subject: [PATCH] Bail early if NetworkManager is used.

Our initscripts vary quite different from Fedoras in that we will
actively start a wpa_supplicant daemon for wireless interfaces

As this can cause problems if the NM detection code is flaky
(which it is) we really do want to bail early when this is the case

https://bugs.mageia.org/show_bug.cgi?id=9028
---
 sysconfig/network-scripts/ifdown |  2 ++
 sysconfig/network-scripts/ifup   | 10 +++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index 597802b..34a10c5 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -49,6 +49,8 @@ if [ "$_use_nm" = "true" ]; then
 	nmcli dev disconnect iface "$DEVICE"
 	exit $?
     fi
+    echo $"$0: interface ${CONFIG} is controlled by NetworkManager; skipping." >&2
+    exit 0
 fi
 
 if [ -x /sbin/ifdown-pre-local ]; then
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 0e69b72..18dad67 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -68,9 +68,13 @@ then
     exit 0
 fi
 
-if [ "$_use_nm" = "true" -a -n "$UUID" ]; then
-    nmcli con up uuid "$UUID"
-    exit $?
+if [ "$_use_nm" = "true" ]; then
+    if [ -n "$UUID" ]; then
+        nmcli con up uuid "$UUID"
+        exit $?
+    fi
+    echo $"$0: interface ${CONFIG} is controlled by NetworkManager; skipping." >&2
+    exit 0
 fi
 
 # Ethernet 802.1Q VLAN support
-- 
1.8.1.4