This is needed as calling rc-service non-existing-svc status will exit with status 1 instead of the expected 2. So the only way to really detect the ErrNotInstalled case is by trying to first resolve the service init script. rc-service --resolve xyz will exit 1 if the service cannot be resolved.
This is needed as calling
rc-service non-existing-svc status
will exit with status1
instead of the expected2
. So the only way to really detect theErrNotInstalled
case is by trying to first resolve the service init script.rc-service --resolve xyz
will exit1
if the service cannot be resolved.