Bug#927911: systemd: Does not expand %h identifier in ExecStart
Norbert Preining
norbert at preining.info
Fri Apr 26 02:56:57 BST 2019
Hi
> The man pages say that %h and %u are resolved to the root user if you
> are using the system instance (PID 1).
> That is consistent with the behaviour you are getting.
> If I missed a part which mentions the contrary, could you quote the
> relevant bits from the documentation, so it can be fixed?
Unit files can be parameterized by a single argument called the
"instance name". The unit is then constructed based on a "template file"
which serves as the definition of multiple services or other units.
A template unit must have a single "@" at the end of the name (right
before the type suffix). The name of the full unit is formed by inserting
the instance name between "@" and the unit type suffix. In the unit file
itself, the instance parameter may be referred to
using "%i" and other specifiers, see below.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
There is no real indication what means "below", but the somehow for me
logical reference is the section
Specifiers
Many settings resolve specifiers which may be used to write generic
unit files referring to runtime or unit parameters that are replaced
when the unit files are loaded. Specifiers must be known and resolvable
for the setting to be valid. The following specifiers are understood:
Table 4. Specifiers available in unit files
...
In my reading that says:
You can use %i and other specifiers **as laid out in the secion
"Specifiers" in the Unit file** ....
I searched all occurrences of % in the man page, and that is all that is
said.
> That said, I do acknowledge that the systemd.unit(5) man page could be
> clearer what effect it has on %h and %u when setting `User=` when
I am not sure how this relates to my question.
Best
Norbert
--
PREINING Norbert http://www.preining.info
Accelia Inc. + JAIST + TeX Live + Debian Developer
GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
More information about the Pkg-systemd-maintainers
mailing list