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
_______________________________________________
systemd-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to