~openstack-charmers/charm-helpers/stable-1604

Viewing all changes in revision 380.

  • Committer: James Page
  • Date: 2016-05-18 16:37:22 UTC
  • Revision ID: james.page@ubuntu.com-20160518163722-hulexn9jxd3wcip8
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.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: