summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2014-10-17 16:11:32 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2014-10-17 16:11:32 -0700
commit2b054e2cb21a14a4db5f3b891854cc15bdfef709 (patch)
treef68045964af484a09078f2f35d91e99a8900d11c /setup.py
parent18d27181905f4474d9b338f1e756b3cadd7c6e57 (diff)
downloadvyos-cloud-init-2b054e2cb21a14a4db5f3b891854cc15bdfef709.tar.gz
vyos-cloud-init-2b054e2cb21a14a4db5f3b891854cc15bdfef709.zip
USR_LIB_EXEC varies depending on system
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index bd41bc91..3b0af03c 100755
--- a/setup.py
+++ b/setup.py
@@ -81,9 +81,13 @@ INITSYS_TYPES = sorted(list(INITSYS_ROOTS.keys()))
# FreeBSD systems.
USR = "/usr"
ETC = "/etc"
+USR_LIB_EXEC = "/usr/lib"
if os.uname()[0] == 'FreeBSD':
USR = "/usr/local"
+ USR_LIB_EXEC = "/usr/local/lib"
ETC = "/usr/local/etc"
+elif os.path.isfile('/etc/redhat-release'):
+ USR_LIB_EXEC = "/usr/libexec"
def get_version():
@@ -149,7 +153,7 @@ setuptools.setup(name='cloud-init',
data_files=[(ETC + '/cloud', glob('config/*.cfg')),
(ETC + '/cloud/cloud.cfg.d', glob('config/cloud.cfg.d/*')),
(ETC + '/cloud/templates', glob('templates/*')),
- (USR + '/lib/cloud-init',
+ (USR_LIB_EXEC + '/cloud-init',
['tools/uncloud-init',
'tools/write-ssh-key-fingerprints']),
(USR + '/share/doc/cloud-init',