I'm looking at the following line in /usr/lib/systemd/system/sshd.service
file on a Fedora 25 box:
ExecStart=/usr/sbin/sshd -D $OPTIONS
I'm not sure where $OPTIONS
comes from. It looks like an environment variable, although when I set a shell variable that way it is ignored, e.g.
# OPTIONS='-p 9999'
# systemctl start sshd
I read through the command lines portion of the systemd.service man page, which indicates that environment variables can be set via an Environment
line:
Environment="ONE=one" 'TWO=two two'
However, no such OPTIONS variable is set there.
There is additionally an EnvironmentFile
line, e.g.:
EnvironmentFile=-/etc/sysconfig/sshd
No $OPTIONS
variable is set there either. To what does $OPTIONS
refer, and how is it set?
export OPTIONS='-p 9999'
before thesystemctl start sshd
?EnvironmentFile
, but it's empty (doesn't exist) by default.invoke-rc.d
andservice
commands have always cleaned the environments,systemd
is no different.