From 483ea3e43766f4b02e36095169fe8f1a7226f951 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 2 Oct 2014 17:42:08 -0700 Subject: [PATCH] Create INITDIR in -lite installs. - Also don't link the init script if it isn't installed. Signed-off-by: Tom Eastep --- Shorewall-lite/install.sh | 3 ++- Shorewall/install.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Shorewall-lite/install.sh b/Shorewall-lite/install.sh index 47a567876..7c2aea6db 100755 --- a/Shorewall-lite/install.sh +++ b/Shorewall-lite/install.sh @@ -346,6 +346,7 @@ fi delete_file ${DESTDIR}/usr/share/$PRODUCT/xmodules install_file $PRODUCT ${DESTDIR}${SBINDIR}/$PRODUCT 0544 +[ -n "${INITFILE}" ] && install -d $OWNERSHIP -m 755 ${DESTDIR}${INITDIR} echo "$Product control program installed in ${DESTDIR}${SBINDIR}/$PRODUCT" @@ -499,7 +500,7 @@ chmod 644 ${DESTDIR}${SHAREDIR}/$PRODUCT/version # Remove and create the symbolic link to the init script # -if [ -z "${DESTDIR}${SYSTEMD}" ]; then +if [ -z "${DESTDIR}" -a -n "${INITFILE}" ]; then rm -f ${SHAREDIR}/$PRODUCT/init ln -s ${INITDIR}/${INITFILE} ${SHAREDIR}/$PRODUCT/init fi diff --git a/Shorewall/install.sh b/Shorewall/install.sh index 714c59b3b..3cf3dd310 100755 --- a/Shorewall/install.sh +++ b/Shorewall/install.sh @@ -1120,7 +1120,7 @@ chmod 644 ${DESTDIR}${SHAREDIR}/$PRODUCT/version # Remove and create the symbolic link to the init script # -if [ -z "${DESTDIR}${SYSTEMD}" ]; then +if [ -z "${DESTDIR}" -a -n "${INITFILE}" ]; then rm -f ${SHAREDIR}/$PRODUCT/init ln -s ${INITDIR}/${INITFILE} ${SHAREDIR}/$PRODUCT/init fi