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.
This commit is contained in:
@@ -291,6 +291,7 @@ int unit_full_printf(const Unit *u, const char *format, char **ret) {
|
||||
|
||||
{ 'm', specifier_machine_id, NULL },
|
||||
{ 'H', specifier_host_name, NULL },
|
||||
{ 'l', specifier_short_host_name, NULL },
|
||||
{ 'b', specifier_boot_id, NULL },
|
||||
{ 'v', specifier_kernel_release, NULL },
|
||||
{}
|
||||
|
||||
Reference in New Issue
Block a user