From d23ba2a8a871226150cdfe3947cd68feceb1b569 Mon Sep 17 00:00:00 2001 From: Derek Higgins Date: Mon, 14 Oct 2013 23:54:37 +0100 Subject: [PATCH] Conditionally add dhcp-all-interfaces If the /etc/init drectory gets created on Fedora, it causes os-svc-daemon to add upstart init scripts instead of systemd. As a result none of the openstack services can start. Partial-Bug: #1239880 Change-Id: Iec317baa3eb9ff651fa66c582d2f614993cde45e --- .../dhcp-all-interfaces/install.d/50-dhcp-all-interfaces | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces b/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces index 7775f6db..a9ef2afa 100755 --- a/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces +++ b/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces @@ -5,5 +5,10 @@ SCRIPTDIR=$(dirname $0) -install -D -g root -o root -m 0755 ${SCRIPTDIR}/generate-interfaces-file.sh /usr/local/sbin/generate-interfaces-file.sh -install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.conf /etc/init/dhcp-all-interfaces.conf +# Currently only installed on Debian-derived distributions +# Installing these on Fedora causes problems with os-svc-daemon +# https://bugs.launchpad.net/tripleo/+bug/1239880 +if [ -d /etc/init ] ; then + install -D -g root -o root -m 0755 ${SCRIPTDIR}/generate-interfaces-file.sh /usr/local/sbin/generate-interfaces-file.sh + install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.conf /etc/init/dhcp-all-interfaces.conf +fi