summaryrefslogtreecommitdiffstats
path: root/tmpfiles.d
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-07-15 16:33:20 +0200
committerLennart Poettering <lennart@poettering.net>2022-07-21 00:06:22 +0200
commita0f4426d0f1205d118e5938cdc28f063044ad5b9 (patch)
treedbd73a1daa6858dd2fb0ec4cc97dd1cb988cd6ff /tmpfiles.d
parentman: split out "Type Modifiers" section from "Types" section in tmpfiles.d docs (diff)
downloadsystemd-a0f4426d0f1205d118e5938cdc28f063044ad5b9.tar.xz
systemd-a0f4426d0f1205d118e5938cdc28f063044ad5b9.zip
tmpfiles: automatically provision /etc/issue.d/ + /etc/motd.d/ + /etc/hosts from credentials
Diffstat (limited to 'tmpfiles.d')
-rw-r--r--tmpfiles.d/meson.build1
-rw-r--r--tmpfiles.d/provision.conf17
2 files changed, 18 insertions, 0 deletions
diff --git a/tmpfiles.d/meson.build b/tmpfiles.d/meson.build
index 4546169694..ca1abbf3fe 100644
--- a/tmpfiles.d/meson.build
+++ b/tmpfiles.d/meson.build
@@ -14,6 +14,7 @@ files = [['README', ''],
['systemd-tmp.conf', ''],
['tmp.conf', ''],
['x11.conf', ''],
+ ['provision.conf', ''],
]
foreach pair : files
diff --git a/tmpfiles.d/provision.conf b/tmpfiles.d/provision.conf
new file mode 100644
index 0000000000..9a4783868f
--- /dev/null
+++ b/tmpfiles.d/provision.conf
@@ -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
+
+# Provision additional loging messages from credentials, if they are set. Note
+# that these lines are NOPs if the credentials are not set or if the files
+# already exist.
+f^ /etc/motd.d/50-provision.conf - - - - login.motd
+f^ /etc/issue.d/50-provision.conf - - - - login.issue
+
+# Provision a /etc/hosts file from credentials.
+f^ /etc/hosts - - - - network.hosts