Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Fixes #19030 -- Service module broken on Trusty #5865

Closed
wants to merge 1 commit into from

Conversation

cloudnull
Copy link
Contributor

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

service

ANSIBLE VERSION
devel
SUMMARY

This change refactors the "check_systemd" function such that it now will
attempt to read "/proc/1/comm" first and should the value of that output
be "systemd" the function will return True. If the output of
"/proc/1/comm" is "init" the function will return False. If
"/proc/1/comm" does not exist the function will look for several canary
files, ["/run/systemd/system/", "/dev/.run/systemd/", "/dev/.systemd/"]
and return True if found. If "/proc/1/comm" does not read "systemd",
does not exist, and none of the canary files are found the function will
return False.

Closes Issue: ansible/ansible#19030

Signed-off-by: Kevin Carter kevin.carter@rackspace.com

This change refactors the "check_systemd" function such that it now will
attempt to read "/proc/1/comm" first and should the value of that output
be "systemd" the function will return True. If the output of
"/proc/1/comm" is "init" the function will return False. If
"/proc/1/comm" does not exist the function will look for several canary
files, ["/run/systemd/system/", "/dev/.run/systemd/", "/dev/.systemd/"]
and return True if found. If neither "/proc/1/comm" reads "systemd",
does not exist, and none of the canary files are found the function will
return False.

Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
@ansibot
Copy link

ansibot commented Dec 9, 2016

This repository has been locked. All new issues and pull requests should be filed in https://github.com/ansible/ansible

Please read through the repomerge page in the dev guide.

@ansibot ansibot closed this Dec 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants