chiark / gitweb /
tmpfiles: make resolv.conf entry conditional on resolved support
authorTom Gundersen <teg@jklm.no>
Wed, 27 Aug 2014 15:45:41 +0000 (17:45 +0200)
committerTom Gundersen <teg@jklm.no>
Wed, 27 Aug 2014 16:17:16 +0000 (18:17 +0200)
Makefile.am
TODO
configure.ac
tmpfiles.d/.gitignore [new file with mode: 0644]
tmpfiles.d/etc.conf.m4 [moved from tmpfiles.d/etc.conf with 95% similarity]

index cbdf551fa8885408d9b385ffbe1a826db930eee9..70faed4acbe7f7941a0e3285a3b85f2cc3910e09 100644 (file)
@@ -1940,14 +1940,16 @@ nodist_systemunit_DATA += \
        units/systemd-tmpfiles-setup.service \
        units/systemd-tmpfiles-clean.service
 
+nodist_tmpfiles_DATA = \
+       tmpfiles.d/etc.conf
+
 dist_tmpfiles_DATA = \
        tmpfiles.d/systemd.conf \
        tmpfiles.d/systemd-nologin.conf \
        tmpfiles.d/systemd-remote.conf \
        tmpfiles.d/tmp.conf \
        tmpfiles.d/x11.conf \
-       tmpfiles.d/var.conf \
-       tmpfiles.d/etc.conf
+       tmpfiles.d/var.conf
 
 if HAVE_SYSV_COMPAT
 dist_tmpfiles_DATA += \
@@ -1970,10 +1972,14 @@ INSTALL_DIRS += \
 endif
 
 EXTRA_DIST += \
+       tmpfiles.d/etc.conf.m4 \
        units/systemd-tmpfiles-setup-dev.service.in \
        units/systemd-tmpfiles-setup.service.in \
        units/systemd-tmpfiles-clean.service.in
 
+CLEANFILES += \
+       tmpfiles.d/etc.conf
+
 # ------------------------------------------------------------------------------
 if ENABLE_SYSUSERS
 systemd_sysusers_SOURCES = \
@@ -5708,6 +5714,11 @@ src/%: src/%.m4
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
 
+tmpfiles.d/%: tmpfiles.d/%.m4
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
+
+
 units/%: units/%.m4
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
diff --git a/TODO b/TODO
index 09f82d3c3707370dd6cae9c32b31bba571cb3944..372825e8bd708dfa87680173e3f85eadb469bf16 100644 (file)
--- a/TODO
+++ b/TODO
@@ -120,8 +120,6 @@ Features:
 
 * Allow multiple ExecStart= for all Type= settings, so that we can cover rescue.service nicely
 
-* the resolv.conf tmpfiles line should be covered by ENABLE_NETWORKD...
-
 * Add a new verb "systemctl top"
 
 * logind: allow users to kill or lock their own sessions
index 18b719856b9a1b17fef27c0855281a975005ec78..08a8a105f8f80e0c1da14ce995511c2d0b781855 100644 (file)
@@ -1023,6 +1023,7 @@ have_resolved=no
 AC_ARG_ENABLE(resolved, AS_HELP_STRING([--disable-resolved], [disable resolve daemon]))
 if test "x$enable_resolved" != "xno"; then
         have_resolved=yes
+        M4_DEFINES="$M4_DEFINES -DENABLE_RESOLVED"
 fi
 AM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"])
 
diff --git a/tmpfiles.d/.gitignore b/tmpfiles.d/.gitignore
new file mode 100644 (file)
index 0000000..eb32315
--- /dev/null
@@ -0,0 +1 @@
+etc.conf
similarity index 95%
rename from tmpfiles.d/etc.conf
rename to tmpfiles.d/etc.conf.m4
index b23272cb277482704622afc95809856144e0e0ad..f567c8d6ea45eefc589fb7357ce98b98d53f5a12 100644 (file)
@@ -10,6 +10,8 @@
 L /etc/os-release - - - - ../usr/lib/os-release
 L /etc/localtime - - - - ../usr/share/zoneinfo/UTC
 L+ /etc/mtab - - - - ../proc/self/mounts
+m4_ifdef(`ENABLE_RESOLVED',
 L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf
+)
 C /etc/nsswitch.conf - - - -
 C /etc/pam.d - - - -