From: Zbigniew Jędrzejewski-Szmek Date: Thu, 7 May 2020 12:59:24 +0000 (+0200) Subject: man: add specifiers section to directives index X-Git-Tag: v246-rc1~414^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0d525a3e9366f744edeb327fec94928305b27cc4;p=thirdparty%2Fsystemd.git man: add specifiers section to directives index The hack with getparent().txt is not very pretty, but the whole thing seems to work well enough. It is useful to figure out whihc specifiers are supported where. --- diff --git a/man/directives-template.xml b/man/directives-template.xml index 3583db3ef07..5ab0beb4cfa 100644 --- a/man/directives-template.xml +++ b/man/directives-template.xml @@ -135,6 +135,14 @@ + + Specifiers + + Short strings which are substituted in configuration directives. + + + + Files and directories diff --git a/man/systemd.dnssd.xml b/man/systemd.dnssd.xml index 9e11677bde4..2fb0a8ee706 100644 --- a/man/systemd.dnssd.xml +++ b/man/systemd.dnssd.xml @@ -75,7 +75,7 @@ An instance name of the network service as defined in the section 4.1.1 of RFC 6763, e.g. webserver. The option supports simple specifier expansion. The following expansions are understood: - +
Specifiers available diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 999a13c5607..dd6d6af21d5 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -1695,7 +1695,7 @@ and resolvable for the setting to be valid. The following specifiers are understood: -
+
Specifiers available in unit files @@ -1710,7 +1710,8 @@ - + %a Architecture A short string identifying the architecture of the local system. A string such as x86, x86-64 or arm64. See the architectures defined for ConditionArchitecture= above for a full list. @@ -1740,7 +1741,8 @@ Note that this setting is not influenced by the User= setting configurable in the [Service] section of the service unit. - + %H Host name The hostname of the running system at the point in time the unit configuration is loaded. diff --git a/man/sysusers.d.xml b/man/sysusers.d.xml index 46e860ee503..5a71d911c45 100644 --- a/man/sysusers.d.xml +++ b/man/sysusers.d.xml @@ -237,7 +237,7 @@ r - 500-900 Specifiers can be used in the "Name", "ID", "GECOS", "Home directory", and "Shell" fields. An unknown or unresolvable specifier is treated as invalid configuration. The following expansions are understood: -
+
Specifiers available diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml index f45dfe0a539..2e9ba5fe90c 100644 --- a/man/tmpfiles.d.xml +++ b/man/tmpfiles.d.xml @@ -618,7 +618,7 @@ w- /proc/sys/vm/swappiness - - - - 10 Specifiers can be used in the "path" and "argument" fields. An unknown or unresolvable specifier is treated as invalid configuration. The following expansions are understood: -
+
Specifiers available diff --git a/tools/make-directive-index.py b/tools/make-directive-index.py index 26561a24563..c6b2173b2e9 100755 --- a/tools/make-directive-index.py +++ b/tools/make-directive-index.py @@ -87,6 +87,15 @@ def _extract_directives(directive_groups, formatting, page): storfile[name.text].append((pagename, section)) formatting[name.text] = name + storfile = directive_groups['specifiers'] + for name in t.iterfind(".//table[@class='specifiers']//entry/literal"): + if name.text[0] != '%' or name.getparent().text is not None: + continue + if name.attrib.get('index') == 'false': + continue + storfile[name.text].append((pagename, section)) + formatting[name.text] = name + def _make_section(template, name, directives, formatting): varlist = template.find(".//*[@id='{}']".format(name)) for varname, manpages in sorted(directives.items()):