[PATCH] network: Replace systemd resolv.conf link with regular file

Colin Walters walters at verbum.org
Mon Jul 7 02:31:50 UTC 2014


[not tested yet, just got done with lorax build]

We want to propagate our network configuration here, so unlink
systemd's link to /run.
---
 pyanaconda/network.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index 9d589bd..396a029 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -1033,6 +1033,10 @@ def write_network_config(storage, ksdata,
instClass, rootpath):
     disableIPV6(rootpath)
     copyIfcfgFiles(rootpath)
     copyDhclientConfFiles(rootpath)
+    # systemd may have created it as a symlink to /run, overwrite 
+    resolvpath = os.path.join("/etc/resolv.conf"
+    if os.path.islink(resolvpath) and not os.path.exists(resolvpath):
+        os.unlink(resolvpath)
     copyFileToPath("/etc/resolv.conf", rootpath,
     overwrite=flags.livecdInstall)
     instClass.setNetworkOnbootDefault(ksdata)
     # NM_CONTROLLED is not mirrored in ksdata
-- 
1.8.3.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-network-Replace-systemd-resolv.conf-link-with-regula.patch
Type: text/x-patch
Size: 1118 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/anaconda-patches/attachments/20140706/5c24507b/attachment.bin>


More information about the anaconda-patches mailing list