[PATCH] Create empty /etc/sysconfig/network for network service (#957897)
Radek Vykydal
rvykydal at redhat.com
Fri May 17 13:25:53 UTC 2013
---
pyanaconda/network.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index 6f73143..6532e6e 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -750,9 +750,20 @@ def usedByRootOnISCSI(iface, storage):
return False
+def write_sysconfig_network(rootpath, overwrite=False):
+
+ cfgfile = os.path.normpath(rootpath + networkConfFile)
+ if (os.path.isfile(cfgfile) and not overwrite):
+ return False
+
+ with open(cfgfile, "w") as f:
+ f.write("# Created by anaconda\n")
+ return True
+
def write_network_config(storage, ksdata, instClass, rootpath):
write_hostname(rootpath, ksdata, overwrite=flags.livecdInstall)
set_hostname(ksdata.network.hostname)
+ write_sysconfig_network(rootpath, overwrite=flags.livecdInstall)
disableIPV6(rootpath)
if not flags.imageInstall:
copyIfcfgFiles(rootpath)
--
1.7.11.7
More information about the anaconda-patches
mailing list