Make the -lite installers consistent with the others WRT SYSTEMD and INITFILE

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-10-08 07:35:47 -07:00
parent 620f88b339
commit 880e63064b

View File

@ -189,7 +189,6 @@ PATH=${SBINDIR}:/bin:/usr${SBINDIR}:/usr/bin:/usr/local/bin:/usr/local${SBINDIR}
# #
cygwin= cygwin=
INSTALLD='-D' INSTALLD='-D'
INITFILE=$PRODUCT
T='-T' T='-T'
if [ -z "$BUILD" ]; then if [ -z "$BUILD" ]; then
@ -281,21 +280,11 @@ if [ -n "$DESTDIR" ]; then
install -d $OWNERSHIP -m 755 ${DESTDIR}/${SBINDIR} install -d $OWNERSHIP -m 755 ${DESTDIR}/${SBINDIR}
install -d $OWNERSHIP -m 755 ${DESTDIR}${INITDIR} install -d $OWNERSHIP -m 755 ${DESTDIR}${INITDIR}
if [ -n "$SYSTEMD" ]; then
mkdir -p ${DESTDIR}/lib/systemd/system
INITFILE=
fi
else else
if [ ! -f /usr/share/shorewall/coreversion ]; then if [ ! -f /usr/share/shorewall/coreversion ]; then
echo "$PRODUCT $VERSION requires Shorewall Core which does not appear to be installed" >&2 echo "$PRODUCT $VERSION requires Shorewall Core which does not appear to be installed" >&2
exit 1 exit 1
fi fi
if [ -f /lib/systemd/system ]; then
SYSTEMD=Yes
INITFILE=
fi
fi fi
echo "Installing $Product Version $VERSION" echo "Installing $Product Version $VERSION"
@ -364,6 +353,7 @@ fi
# Install the .service file # Install the .service file
# #
if [ -n "$SYSTEMD" ]; then if [ -n "$SYSTEMD" ]; then
mkdir -p ${DESTDIR}${SYSTEMD}
run_install $OWNERSHIP -m 600 $PRODUCT.service ${DESTDIR}/${SYSTEMD}/$PRODUCT.service run_install $OWNERSHIP -m 600 $PRODUCT.service ${DESTDIR}/${SYSTEMD}/$PRODUCT.service
[ ${SBINDIR} != /sbin ] && eval sed -i \'s\|/sbin/\|${SBINDIR}/\|\' ${DESTDIR}${SYSTEMD}/$PRODUCT.service [ ${SBINDIR} != /sbin ] && eval sed -i \'s\|/sbin/\|${SBINDIR}/\|\' ${DESTDIR}${SYSTEMD}/$PRODUCT.service
echo "Service file installed as ${DESTDIR}/lib/systemd/system/$PRODUCT.service" echo "Service file installed as ${DESTDIR}/lib/systemd/system/$PRODUCT.service"