From 2b054e2cb21a14a4db5f3b891854cc15bdfef709 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Fri, 17 Oct 2014 16:11:32 -0700 Subject: USR_LIB_EXEC varies depending on system --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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', -- cgit v1.2.3