summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorVlastimil Holer <vlastimil.holer@gmail.com>2013-09-05 13:11:09 +0200
committerVlastimil Holer <vlastimil.holer@gmail.com>2013-09-05 13:11:09 +0200
commit744c779182cba32314f8435660a61c2711cb9f54 (patch)
tree7871342bf0b122217b51493286bac982313b48da /setup.py
parent8a2a88e0bb4520eabe99b6686413a548f3d59652 (diff)
parent1d27cd75eaaeef7b72f3be77de24da815c82a825 (diff)
downloadvyos-cloud-init-744c779182cba32314f8435660a61c2711cb9f54.tar.gz
vyos-cloud-init-744c779182cba32314f8435660a61c2711cb9f54.zip
Merged trunk lp:cloud-init
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 24476681..8d18b97e 100755
--- a/setup.py
+++ b/setup.py
@@ -37,12 +37,14 @@ def is_f(p):
INITSYS_FILES = {
- 'sysvinit': [f for f in glob('sysvinit/*') if is_f(f)],
+ 'sysvinit': [f for f in glob('sysvinit/redhat/*') if is_f(f)],
+ 'sysvinit_deb': [f for f in glob('sysvinit/debian/*') if is_f(f)],
'systemd': [f for f in glob('systemd/*') if is_f(f)],
'upstart': [f for f in glob('upstart/*') if is_f(f)],
}
INITSYS_ROOTS = {
'sysvinit': '/etc/rc.d/init.d',
+ 'sysvinit_deb': '/etc/init.d',
'systemd': '/etc/systemd/system/',
'upstart': '/etc/init/',
}
@@ -59,9 +61,10 @@ def tiny_p(cmd, capture=True):
sp = subprocess.Popen(cmd, stdout=stdout,
stderr=stderr, stdin=None)
(out, err) = sp.communicate()
- if sp.returncode not in [0]:
+ ret = sp.returncode # pylint: disable=E1101
+ if ret not in [0]:
raise RuntimeError("Failed running %s [rc=%s] (%s, %s)"
- % (cmd, sp.returncode, out, err))
+ % (cmd, ret, out, err))
return (out, err)