]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/sysusers/sysusers.c
Add %l as specifier for the hostname without any domain component
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 7 May 2020 14:16:19 +0000 (16:16 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 7 May 2020 15:36:44 +0000 (17:36 +0200)
commite97708fa3e029902c02676bba6e6c2f54f1eba3a
tree349570a01163d44533cde31019e6c66a3b200ef4
parenteef4b80033e9ca8e61ccb40a710babcfe9b69b26
Add %l as specifier for the hostname without any domain component

As described in #15603, it is a fairly common setup to use a fqdn as the
configured hostname. But it is often convenient to use just the actual
hostname, i.e. until the first dot. This adds support in tmpfiles, sysusers,
and unit files for %l which expands to that.

Fixes #15603.
12 files changed:
man/standard-specifiers.xml
man/systemd.unit.xml
man/sysusers.d.xml
man/tmpfiles.d.xml
src/basic/hostname-util.c
src/basic/hostname-util.h
src/core/unit-printf.c
src/shared/specifier.c
src/shared/specifier.h
src/sysusers/sysusers.c
src/test/test-hostname-util.c
src/tmpfiles/tmpfiles.c