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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
From aeb50ff0bd4bbbca74c4695072232348351d512d Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Wed, 27 Aug 2014 17:45:41 +0200
Subject: [PATCH] tmpfiles: make resolv.conf entry conditional on resolved
support
Upstream-Status: Backport
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Makefile.am | 15 +++++++++++++--
TODO | 2 --
configure.ac | 1 +
tmpfiles.d/.gitignore | 1 +
tmpfiles.d/{etc.conf => etc.conf.m4} | 2 ++
5 files changed, 17 insertions(+), 4 deletions(-)
create mode 100644 tmpfiles.d/.gitignore
rename tmpfiles.d/{etc.conf => etc.conf.m4} (95%)
Index: git/Makefile.am
===================================================================
--- git.orig/Makefile.am 2015-01-24 00:41:20.134716451 -0800
+++ git/Makefile.am 2015-01-24 00:41:20.126716451 -0800
@@ -1935,14 +1935,16 @@
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 += \
@@ -1965,10 +1967,14 @@
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 = \
@@ -5684,6 +5690,11 @@
$(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 < $< > $@
Index: git/TODO
===================================================================
--- git.orig/TODO 2015-01-24 00:41:20.134716451 -0800
+++ git/TODO 2015-01-24 00:41:20.126716451 -0800
@@ -111,8 +111,6 @@
* 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: git/configure.ac
===================================================================
--- git.orig/configure.ac 2015-01-24 00:41:20.134716451 -0800
+++ git/configure.ac 2015-01-24 00:41:20.126716451 -0800
@@ -1041,6 +1041,7 @@
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"])
Index: git/tmpfiles.d/.gitignore
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/tmpfiles.d/.gitignore 2015-01-24 00:41:20.126716451 -0800
@@ -0,0 +1 @@
+etc.conf
Index: git/tmpfiles.d/etc.conf
===================================================================
--- git.orig/tmpfiles.d/etc.conf 2015-01-24 00:41:20.134716451 -0800
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,15 +0,0 @@
-# This file is part of systemd.
-#
-# systemd is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-
-# See tmpfiles.d(5) for details
-
-L /etc/os-release - - - - ../usr/lib/os-release
-L /etc/localtime - - - - ../usr/share/zoneinfo/UTC
-L+ /etc/mtab - - - - ../proc/self/mounts
-L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf
-C /etc/nsswitch.conf - - - -
-C /etc/pam.d - - - -
Index: git/tmpfiles.d/etc.conf.m4
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/tmpfiles.d/etc.conf.m4 2015-01-24 00:41:20.126716451 -0800
@@ -0,0 +1,17 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+# See tmpfiles.d(5) for details
+
+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 - - - -
|