← Back to team overview

cloud-init-dev team mailing list archive

[Merge] lp:~xnox/cloud-init/fix-systemd-install-paths into lp:cloud-init

 

Dimitri John Ledkov has proposed merging lp:~xnox/cloud-init/fix-systemd-install-paths into lp:cloud-init.

Requested reviews:
  cloud init development team (cloud-init-dev)

For more details, see:
https://code.launchpad.net/~xnox/cloud-init/fix-systemd-install-paths/+merge/227918
-- 
https://code.launchpad.net/~xnox/cloud-init/fix-systemd-install-paths/+merge/227918
Your team cloud init development team is requested to review the proposed merge of lp:~xnox/cloud-init/fix-systemd-install-paths into lp:cloud-init.
=== modified file 'setup.py'
--- setup.py	2014-02-03 22:53:31 +0000
+++ setup.py	2014-07-23 13:55:45 +0000
@@ -35,6 +35,10 @@
 def is_f(p):
     return os.path.isfile(p)
 
+if is_f('/etc/debian_version'):
+    systemd_root = '/lib/systemd/system/'
+else:
+    systemd_root = '/etc/systemd/system/'
 
 INITSYS_FILES = {
     'sysvinit': [f for f in glob('sysvinit/redhat/*') if is_f(f)],
@@ -45,7 +49,7 @@
 INITSYS_ROOTS = {
     'sysvinit': '/etc/rc.d/init.d',
     'sysvinit_deb': '/etc/init.d',
-    'systemd': '/etc/systemd/system/',
+    'systemd': systemd_root,
     'upstart': '/etc/init/',
 }
 INITSYS_TYPES = sorted(list(INITSYS_ROOTS.keys()))


Follow ups