summaryrefslogtreecommitdiff
path: root/tmpfiles.d
diff options
context:
space:
mode:
authorcodekipper <codekipper@gmail.com>2017-05-24 11:10:59 +0200
committerLennart Poettering <lennart@poettering.net>2017-05-24 11:10:59 +0200
commita083537e5d11bce68639c492eda33a7fe997d142 (patch)
treeaf46aec1e90257a5bfdcffe25fc2e13d1d364d24 /tmpfiles.d
parenta924f43f30f9c4acaf70618dd2a055f8b0f166be (diff)
downloadsystemd-a083537e5d11bce68639c492eda33a7fe997d142.tar.gz
tmpfiles: Remove unnecessary utmp file creation (#6006)
If utmp is disabled (--disable-utmp) then there is no need to create the wtmp and btmp files.
Diffstat (limited to 'tmpfiles.d')
-rw-r--r--tmpfiles.d/meson.build4
-rw-r--r--tmpfiles.d/var.conf.m4 (renamed from tmpfiles.d/var.conf)2
2 files changed, 4 insertions, 2 deletions
diff --git a/tmpfiles.d/meson.build b/tmpfiles.d/meson.build
index d68d17e956..da87ea5056 100644
--- a/tmpfiles.d/meson.build
+++ b/tmpfiles.d/meson.build
@@ -6,7 +6,6 @@ tmpfiles = [['home.conf', ''],
['systemd-nspawn.conf', ''],
['systemd-remote.conf', 'ENABLE_REMOTE'],
['tmp.conf', ''],
- ['var.conf', ''],
['x11.conf', ''],
['legacy.conf', 'HAVE_SYSV_COMPAT'],
]
@@ -23,7 +22,8 @@ foreach pair : tmpfiles
endforeach
m4_files = ['etc.conf',
- 'systemd.conf']
+ 'systemd.conf',
+ 'var.conf']
foreach file : m4_files
custom_target(
diff --git a/tmpfiles.d/var.conf b/tmpfiles.d/var.conf.m4
index ae7952e77a..24374ba8cb 100644
--- a/tmpfiles.d/var.conf
+++ b/tmpfiles.d/var.conf.m4
@@ -12,8 +12,10 @@ q /var 0755 - - -
L /var/run - - - - ../run
d /var/log 0755 - - -
+m4_ifdef(`HAVE_UTMP',
f /var/log/wtmp 0664 root utmp -
f /var/log/btmp 0600 root utmp -
+)m4_dnl
d /var/cache 0755 - - -