Documentation of =- (equals minus) in systemd unit files
This is documented in systemd.exec
:
EnvironmentFile=
[...]
The argument passed should be an absolute filename or wildcard expression, optionally prefixed with "
-
", which indicates that if the file does not exist, it will not be read and no error or warning message is logged.
And in systemd.service
:
… For each of the specified commands, the first argument must be an absolute path to an executable. Optionally, this filename may be prefixed with a number of special characters:
ExecStart=
Table 1. Special executable prefixes
…
ExecStartPre=
,ExecStartPost=
… If any of those commands (not prefixed with-
) fail, the rest are not executed and the unit is considered failed.
(To find the most complete documentation for a systemd directive, look it up in systemd.directives
.)
Additionally, a line like
After=-.mount
looks like another "equals minus"-Syntax but instead is just an After=
directive listing the special system unit -.mount
, which is the root mount point.
Docs: https://www.freedesktop.org/software/systemd/man/systemd.special.html#-.mount