~cloud-init-dev/cloud-init/trunk

Viewing all changes in revision 1112.

  • Committer: Scott Moser
  • Date: 2015-06-10 16:30:02 UTC
  • mfrom: (1110.1.3 master)
  • Revision ID: smoser@ubuntu.com-20150610163002-qj95kijgx4qj2x79
check for systemd using sd_booted() semantics

The existing code determines if systemd is in use by looking at the
distribution name and version. This is prone to error because:
- RHEL derivatives other than CentOS (e.g., Scientific Linux) will fail
  this test
- Distributions that are not derived from RHEL also use systemd

This patch makes cloud-init use the same logic that is used in systemd's
sd_booted() method
 http://www.freedesktop.org/software/systemd/man/sd_booted.html

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: