-
Committer:
James Page
-
Date:
2016-05-18 12:42:56 UTC
-
mfrom:
(572.2.2 fixup-service-running)
-
Revision ID:
james.page@ubuntu.com-20160518124256-3yrnyd8v4sj32wzk
Refactor service_running to determine init approach
Use of "service --status-all" has some challenges on trusty where
a recent lsb-base update resulted in all calls being diverted to
upstart, where return codes for non-running daemons are still 0.
Detect whether to use upstart or the base init.d script to
determine whether a service is running, and look at either the
upstart output, or for a non-zero return code from an init.d
status call.