normalized unit file path, which is particularly useful for symlinked
unit files.
- The new %R specifier resolves to the pretty hostname
+ The new %q specifier resolves to the pretty hostname
(i.e. PRETTY_HOSTNAME= from /etc/machine-info).
The new %d specifier resolves to the credentials directory of a
<entry>Short host name</entry>
<entry>The hostname of the running system, truncated at the first dot to remove any domain component.</entry>
</row>
- <row id='R'>
- <entry><literal>%R</literal></entry>
- <entry>Pretty host name</entry>
- <entry>The pretty hostname of the running system, as read from the <varname>PRETTY_HOSTNAME=</varname> field of <filename>/etc/machine-info</filename>. If not set, resolves to the short hostname. See <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more information.</entry>
- </row>
<row id='m'>
<entry><literal>%m</literal></entry>
<entry>Machine ID</entry>
<entry>Operating system ID</entry>
<entry>The operating system identifier of the running system, as read from the <varname>ID=</varname> field of <filename>/etc/os-release</filename>. See <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more information.</entry>
</row>
+ <row id='q'>
+ <entry><literal>%q</literal></entry>
+ <entry>Pretty host name</entry>
+ <entry>The pretty hostname of the running system, as read from the <varname>PRETTY_HOSTNAME=</varname> field of <filename>/etc/machine-info</filename>. If not set, resolves to the short hostname. See <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more information.</entry>
+ </row>
<row id='T'>
<entry><literal>%T</literal></entry>
<entry>Directory for temporary files</entry>
<row>
<!-- We do not use the common definition from standard-specifiers.xml here since we want a
slightly more verbose explanation here, referring to the reload cycle. -->
- <entry><literal>%R</literal></entry>
+ <entry><literal>%q</literal></entry>
<entry>Pretty host name</entry>
<entry>The pretty hostname of the running system at the point in time the unit configuration is loaded, as read from the <varname>PRETTY_HOSTNAME=</varname> field of <filename>/etc/machine-info</filename>. If not set, resolves to the short hostname. See <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more information.</entry>
</row>
* %B: the OS build ID, according to /etc/os-release
* %H: the hostname of the running system
* %l: the short hostname of the running system
+ * %q: the 'pretty' hostname as per /etc/machine-info
* %m: the machine ID of the running system
* %M: the OS image ID, according to /etc/os-release
* %o: the OS ID according to /etc/os-release
{ 'B', specifier_os_build_id, NULL }, \
{ 'H', specifier_host_name, NULL }, \
{ 'l', specifier_short_host_name, NULL }, \
- { 'R', specifier_pretty_host_name,NULL }, \
+ { 'q', specifier_pretty_host_name,NULL }, \
{ 'm', specifier_machine_id, NULL }, \
{ 'M', specifier_os_image_id, NULL }, \
{ 'o', specifier_os_id, NULL }, \
assert_se(streq(w, "xxx a=AAAA b=BBBB e= yyy"));
free(w);
- r = specifier_printf("machine=%m, boot=%b, host=%H, pretty=%R, version=%v, arch=%a, empty=%e", SIZE_MAX, table, NULL, NULL, &w);
+ r = specifier_printf("machine=%m, boot=%b, host=%H, pretty=%q, version=%v, arch=%a, empty=%e", SIZE_MAX, table, NULL, NULL, &w);
assert_se(r >= 0);
assert_se(w);
puts(w);