diff --git a/package/systemd/Config.in b/package/systemd/Config.in index 45a9e2d644..33ac03e584 100644 --- a/package/systemd/Config.in +++ b/package/systemd/Config.in @@ -518,6 +518,26 @@ config BR2_PACKAGE_SYSTEMD_USERDB https://www.freedesktop.org/software/systemd/man/systemd-userdbd.service.html +config BR2_PACKAGE_SYSTEMD_UTMP + bool "enable utmp support" + help + systemd-update-utmp-runlevel.service is a service that writes + SysV runlevel changes to utmp and wtmp, as well as the audit + logs, as they occur. systemd-update-utmp.service does the + same for system reboots and shutdown requests. + + https://www.freedesktop.org/software/systemd/man/systemd-update-utmp.service.html + + Utmp keeps track of what users do on the system (where they + logged from, on which terminal, ...) along with a general + status of the system (list of reboots, current uptime, current + number of users logged in). + + You should only enable this if your system will have actual + users who log in. + + https://man7.org/linux/man-pages/man5/utmp.5.html + config BR2_PACKAGE_SYSTEMD_VCONSOLE bool "enable vconsole tool" default y diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk index b96873b73f..f191542866 100644 --- a/package/systemd/systemd.mk +++ b/package/systemd/systemd.mk @@ -87,8 +87,7 @@ SYSTEMD_CONF_OPTS += \ -Dtelinit-path= \ -Dtests=false \ -Dtmpfiles=true \ - -Dumount-path=/usr/bin/umount \ - -Dutmp=false + -Dumount-path=/usr/bin/umount SYSTEMD_CFLAGS = $(TARGET_CFLAGS) ifeq ($(BR2_OPTIMIZE_FAST),y) @@ -331,6 +330,12 @@ else SYSTEMD_CONF_OPTS += -Dbinfmt=false endif +ifeq ($(BR2_PACKAGE_SYSTEMD_UTMP),y) +SYSTEMD_CONF_OPTS += -Dutmp=true +else +SYSTEMD_CONF_OPTS += -Dutmp=false +endif + ifeq ($(BR2_PACKAGE_SYSTEMD_VCONSOLE),y) SYSTEMD_CONF_OPTS += -Dvconsole=true else