[PATCH] postinstall: Reset /etc/resolv.conf to regular file instead of networkd link

Colin Walters walters at verbum.org
Mon Jul 7 02:29:25 UTC 2014


In:
http://cgit.freedesktop.org/systemd/systemd/commit/?id=d4c6d50a2adfe61c21c5ac5598a301a35b10ef1c
systemd started creating /etc/resolv.conf as a symlink to
../run/systemd/resolve/resolv.conf,
assuming systemd-resolved is in use.  Since ../run isn't mounted and
started
in the lorax generated tree, appending to it fails.

Now this is a messy topic as presently lorax-generated systems use
NetworkManager, which does its own handling of resolv.conf.  Since NM
wants it to be a plain file, let's set it up that way.
---
 share/runtime-postinstall.tmpl | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/share/runtime-postinstall.tmpl
b/share/runtime-postinstall.tmpl
index 4db5756..12638c2 100644
--- a/share/runtime-postinstall.tmpl
+++ b/share/runtime-postinstall.tmpl
@@ -45,8 +45,15 @@ replace "#ReserveVT=6" "ReserveVT=2"
etc/systemd/logind.conf
 ## Don't write the journal to the overlay, just keep it in RAM
 remove var/log/journal
 
-## install some basic configuration files
+## resolv.conf
+# systemd-resolved may have set up /etc/resolv.conf -> /run/,
+# which we don't want here.  Assume for now lorax generated
+# systems will use NetworkManager, or at least be happy
+# with a regular file for /etc/resolv.conf
+remove etc/resolv.conf
 append etc/resolv.conf ""
+
+## install some basic configuration files
 append etc/fstab ""
 install ${configdir}/i18n etc/sysconfig
 install ${configdir}/rsyslog.conf etc
-- 
1.8.3.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-postinstall-Reset-etc-resolv.conf-to-regular-file-in.patch
Type: text/x-patch
Size: 1705 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/anaconda-patches/attachments/20140706/b8cae04a/attachment.bin>


More information about the anaconda-patches mailing list