Kevin Hsu
2018-01-25 05:43:29 UTC
Hi folks,
"systemctl is-active" command gives "inactive" no matter the unit exists
and indeed inactive or it just not exist. This behavior is semantically
true since a unit can never be active
if it does not exist. But "systemctl is-enabled" command will give a clear
result "Failed to get unit file state for no-exist.service: No such file or
directory" to indicate user the existence
of the given unit. I am wondering if "systemctl is-active" should behave
the same.
systemctl --version
systemd 235
systemctl is-active non-exist.service
inactive
systemctl is-enabled non-exist.service
Failed to get unit file state for non-exist.service: No such file or
directory
Best regards,
Kevin Hsu
"systemctl is-active" command gives "inactive" no matter the unit exists
and indeed inactive or it just not exist. This behavior is semantically
true since a unit can never be active
if it does not exist. But "systemctl is-enabled" command will give a clear
result "Failed to get unit file state for no-exist.service: No such file or
directory" to indicate user the existence
of the given unit. I am wondering if "systemctl is-active" should behave
the same.
systemctl --version
systemd 235
systemctl is-active non-exist.service
inactive
systemctl is-enabled non-exist.service
Failed to get unit file state for non-exist.service: No such file or
directory
Best regards,
Kevin Hsu