linux - systemctl show does not show several properties -
i working systemctl
value of environmentfile property ssh.service unit file using command systemctl show ssh.service -p environmentfile
returns empty result.
the unit file contains property. example unit file looks (cat /lib/systemd/system/ssh.service
):
[unit] description=openbsd secure shell server after=network.target auditd.service conditionpathexists=!/etc/ssh/sshd_not_to_be_run [service] environmentfile=-/etc/default/ssh execstart=/usr/sbin/sshd -d $sshd_opts execreload=/bin/kill -hup $mainpid killmode=process restart=on-failure restartpreventexitstatus=255 type=notify [install] wantedby=multi-user.target alias=sshd.service
moreover if systemctl show ssh.service | grep environmentfile
get:
environmentfile=/etc/default/ssh (ignore_errors=yes)
almost other properties work expected, example systemctl show ssh.service -p after
returns extended dependencies:
after=network.target auditd.service systemd-journald.socket basic.target sysinit.target system.slice
the same problem property conditionpathexists, in case grep doesn't show property (systemctl show ssh.service | grep conditionpathexists
prints nothing).
why happen? , how environmentfile property unit file without using grep
?
i've reproduced issue missing environmentfile
in systemd 229 , cross referenced documentation systemctl
news
file latest release of systemd
see if there mentions of behavior being changed. there not.
this appears bug in systemd
. documentation systemctl
implies work, when reviewing documentation show
, --property
. noted, property there if grep it.
i encourage search through existing open issues systemd see if there's open issue this. if not, open new issue report.
if behavior working intended, man systemctl
docs should updated clarify that.
Comments
Post a Comment