More configure/install/uninstall fixes from Matt Darfeuille

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2015-12-05 08:31:22 -08:00
parent 8e7f001f7e
commit 4139c932a4
4 changed files with 15 additions and 6 deletions

View File

@ -91,6 +91,8 @@ for p in $@; do
fi
done
cd $(dirname $0)
vendor=${params[HOST]}
if [ -z "$vendor" ]; then

View File

@ -490,7 +490,11 @@ esac
if [ -z "$DESTDIR" ]; then
if [ $configure -eq 1 -a -n "$first_install" ]; then
if [ $HOST = debian ]; then
if mywhich insserv; then
if [ -n "$SERVICEDIR" ]; then
if systemctl enable ${PRODUCT}.service; then
echo "Shorewall INit will start automatically at boot"
fi
elif mywhich insserv; then
if insserv ${INITDIR}/shorewall-init; then
echo "Shorewall Init will start automatically at boot"
else

View File

@ -195,9 +195,11 @@ if [ -f "$FIREWALL" ]; then
remove_file $FIREWALL
fi
if [ -n "$SYSTEMD" ]; then
[ -z "$SERVICEDIR" ] && SERVICEDIR="$SYSTEMD"
if [ -n "$SERVICEDIR" ]; then
[ $configure -eq 1 ] && systemctl disable ${PRODUCT}
rm -f $SYSTEMD/shorewall-lite.service
rm -f $SERVICEDIR/shorewall-lite.service
fi
rm -f ${SBINDIR}/shorewall-lite

View File

@ -193,9 +193,11 @@ if [ -f "$FIREWALL" ]; then
remove_file $FIREWALL
fi
if [ -n "$SYSTEMD" ]; then
[ -z "$SERVICEDIR" ] && SERVICEDIR="$SYSTEMD"
if [ -n "$SERVICEDIR" ]; then
[ $configure -eq 1 ] && systemctl disable ${PRODUCT}
rm -f $SYSTEMD/shorewall6-lite.service
rm -f $SERVICEDIR/shorewall6-lite.service
fi
rm -f ${SBINDIR}/shorewall6-lite
@ -205,7 +207,6 @@ rm -rf ${SHAREDIR}/shorewall6-lite
rm -rf ${LIBEXECDIR}/shorewall6-lite
rm -f ${CONFDIR}/logrotate.d/shorewall6-lite
rm -f ${SYSCONFDIR}/shorewall6-lite
[ -n "$SYSTEMD" ] && rm -f ${SYSTEMD}/shorewall6-lite.service
rm -f ${MANDIR}/man5/shorewall6-lite*
rm -f ${MANDIR}/man8/shorewall6-lite*