aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-installer/anaconda/files/0048-fix-write-sysconfig-network-failed.patch
blob: 1630732733e542539927ab6867749dc1de3a4a2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From e7cd81f9fb98e09749469b9998362d74142b1c37 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Mon, 24 Oct 2016 05:28:01 -0400
Subject: [PATCH 48/65] fix write sysconfig network failed

While target does not have sysconfig, the anaconda should not
write sysconfig network.

Upstream-Status: Pending

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 pyanaconda/network.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index 6eb08d4..e409b70 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -1356,6 +1356,9 @@ def usedByFCoE(iface, storage):
 
 def write_sysconfig_network(rootpath, overwrite=False):
 
+    if (not os.path.isdir(rootpath + sysconfigDir)):
+        return False
+
     cfgfile = os.path.normpath(rootpath + networkConfFile)
     if (os.path.isfile(cfgfile) and not overwrite):
         return False
-- 
2.7.4