diff options
author | Dimitri John Ledkov <dimitri.ledkov@canonical.com> | 2014-07-23 14:54:14 +0100 |
---|---|---|
committer | Dimitri John Ledkov <dimitri.ledkov@canonical.com> | 2014-07-23 14:54:14 +0100 |
commit | a11e3764f1fdd8bf6f192dba2c1bcc7fbb803a01 (patch) | |
tree | bb708548766404623d087b42eac4c9ec68002a48 /setup.py | |
parent | e9f9c1e1cd47786b93491fd0f73467674c88828e (diff) | |
download | vyos-cloud-init-a11e3764f1fdd8bf6f192dba2c1bcc7fbb803a01.tar.gz vyos-cloud-init-a11e3764f1fdd8bf6f192dba2c1bcc7fbb803a01.zip |
Make systemd root installation dir appropriate for debian-like systems, else fallback to universally acceptable one.
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -35,6 +35,10 @@ import subprocess 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_FILES = { 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())) |