mirror of
https://github.com/systemd/systemd.git
synced 2025-07-27 11:42:17 +03:00
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.
This commit is contained in:
committed by
Lennart Poettering
parent
a924f43f30
commit
a083537e5d
@ -2675,13 +2675,13 @@ nodist_systemunit_DATA += \
|
|||||||
|
|
||||||
nodist_tmpfiles_DATA = \
|
nodist_tmpfiles_DATA = \
|
||||||
tmpfiles.d/systemd.conf \
|
tmpfiles.d/systemd.conf \
|
||||||
|
tmpfiles.d/var.conf \
|
||||||
tmpfiles.d/etc.conf
|
tmpfiles.d/etc.conf
|
||||||
|
|
||||||
dist_tmpfiles_DATA = \
|
dist_tmpfiles_DATA = \
|
||||||
tmpfiles.d/systemd-nologin.conf \
|
tmpfiles.d/systemd-nologin.conf \
|
||||||
tmpfiles.d/tmp.conf \
|
tmpfiles.d/tmp.conf \
|
||||||
tmpfiles.d/x11.conf \
|
tmpfiles.d/x11.conf \
|
||||||
tmpfiles.d/var.conf \
|
|
||||||
tmpfiles.d/home.conf \
|
tmpfiles.d/home.conf \
|
||||||
tmpfiles.d/systemd-nspawn.conf \
|
tmpfiles.d/systemd-nspawn.conf \
|
||||||
tmpfiles.d/journal-nocow.conf
|
tmpfiles.d/journal-nocow.conf
|
||||||
@ -2709,6 +2709,7 @@ endif
|
|||||||
EXTRA_DIST += \
|
EXTRA_DIST += \
|
||||||
tmpfiles.d/systemd.conf.m4 \
|
tmpfiles.d/systemd.conf.m4 \
|
||||||
tmpfiles.d/etc.conf.m4 \
|
tmpfiles.d/etc.conf.m4 \
|
||||||
|
tmpfiles.d/var.conf.m4 \
|
||||||
units/systemd-tmpfiles-setup-dev.service.in \
|
units/systemd-tmpfiles-setup-dev.service.in \
|
||||||
units/systemd-tmpfiles-setup.service.in \
|
units/systemd-tmpfiles-setup.service.in \
|
||||||
units/systemd-tmpfiles-clean.service.in
|
units/systemd-tmpfiles-clean.service.in
|
||||||
|
@ -422,7 +422,11 @@ AC_ARG_ENABLE([utmp], AS_HELP_STRING([--disable-utmp], [disable utmp/wtmp log ha
|
|||||||
[xyes], [have_utmp=yes],
|
[xyes], [have_utmp=yes],
|
||||||
[xno], [have_utmp=no],
|
[xno], [have_utmp=no],
|
||||||
AC_MSG_ERROR(bad value ${enableval} for --enable-utmp)))
|
AC_MSG_ERROR(bad value ${enableval} for --enable-utmp)))
|
||||||
AS_IF([test "x$have_utmp" = "xyes"], [AC_DEFINE(HAVE_UTMP, 1, [Define if utmp/wtmp support is enabled])])
|
AS_IF([test "x$have_utmp" = "xyes"], [
|
||||||
|
AC_DEFINE(HAVE_UTMP, 1, [Define if utmp/wtmp support is enabled])
|
||||||
|
have_utmp=yes
|
||||||
|
M4_DEFINES="$M4_DEFINES -DHAVE_UTMP"],
|
||||||
|
[have_utmp=no])
|
||||||
AM_CONDITIONAL([HAVE_UTMP], [test "x$have_utmp" = "xyes"])
|
AM_CONDITIONAL([HAVE_UTMP], [test "x$have_utmp" = "xyes"])
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
@ -6,7 +6,6 @@ tmpfiles = [['home.conf', ''],
|
|||||||
['systemd-nspawn.conf', ''],
|
['systemd-nspawn.conf', ''],
|
||||||
['systemd-remote.conf', 'ENABLE_REMOTE'],
|
['systemd-remote.conf', 'ENABLE_REMOTE'],
|
||||||
['tmp.conf', ''],
|
['tmp.conf', ''],
|
||||||
['var.conf', ''],
|
|
||||||
['x11.conf', ''],
|
['x11.conf', ''],
|
||||||
['legacy.conf', 'HAVE_SYSV_COMPAT'],
|
['legacy.conf', 'HAVE_SYSV_COMPAT'],
|
||||||
]
|
]
|
||||||
@ -23,7 +22,8 @@ foreach pair : tmpfiles
|
|||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
m4_files = ['etc.conf',
|
m4_files = ['etc.conf',
|
||||||
'systemd.conf']
|
'systemd.conf',
|
||||||
|
'var.conf']
|
||||||
|
|
||||||
foreach file : m4_files
|
foreach file : m4_files
|
||||||
custom_target(
|
custom_target(
|
||||||
|
@ -12,8 +12,10 @@ q /var 0755 - - -
|
|||||||
L /var/run - - - - ../run
|
L /var/run - - - - ../run
|
||||||
|
|
||||||
d /var/log 0755 - - -
|
d /var/log 0755 - - -
|
||||||
|
m4_ifdef(`HAVE_UTMP',
|
||||||
f /var/log/wtmp 0664 root utmp -
|
f /var/log/wtmp 0664 root utmp -
|
||||||
f /var/log/btmp 0600 root utmp -
|
f /var/log/btmp 0600 root utmp -
|
||||||
|
)m4_dnl
|
||||||
|
|
||||||
d /var/cache 0755 - - -
|
d /var/cache 0755 - - -
|
||||||
|
|
Reference in New Issue
Block a user