dcavalca / rpms / initscripts

Forked from rpms/initscripts 4 years ago
Clone
Blob Blame History Raw
From a4eefc6bdfb1e6872ef83428b833a0cc6474e8e2 Mon Sep 17 00:00:00 2001
From: Thomas Haller <thaller@redhat.com>
Date: Mon, 13 Jun 2016 16:40:46 +0200
Subject: [PATCH] source_config: tell NetworkManger to load ifcfg file even for
 NM_CONTROLLED=no

Cherry-picked from: 61fb1cb
Resolves: #1345919
---
 sysconfig/network-scripts/network-functions | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 61a851f..db729cc 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -170,10 +170,12 @@ source_config ()
     else
 	ISALIAS=no
     fi
-    if ! is_false $NM_CONTROLLED && is_nm_running; then
-	nmcli con load "/etc/sysconfig/network-scripts/$CONFIG"
-	UUID=$(get_uuid_by_config $CONFIG)
-	[ -n "$UUID" ] && _use_nm=true
+    if is_nm_running; then
+        nmcli con load "/etc/sysconfig/network-scripts/$CONFIG"
+        if ! is_false $NM_CONTROLLED; then
+            UUID=$(get_uuid_by_config $CONFIG)
+            [ -n "$UUID" ] && _use_nm=true
+        fi
     fi
 }
 
-- 
2.8.3