Another round of uninstall fixes

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2014-10-04 13:29:51 -07:00
parent 9dc2bba025
commit 8571e0dca0
3 changed files with 19 additions and 6 deletions

View File

@ -188,11 +188,15 @@ fi
rm -f ${SBINDIR}/shorewall-lite rm -f ${SBINDIR}/shorewall-lite
rm -rf ${CONFDIR}/shorewall-lite
rm -rf ${VARDIR}/shorewall-lite rm -rf ${VARDIR}/shorewall-lite
rm -rf ${SHAREDIR}/shorewall-lite rm -rf ${SHAREDIR}/shorewall-lite
rm -rf ${LIBEXEC}/shorewall-lite rm -rf ${LIBEXEC}/shorewall-lite
rm -f ${CONFDIR}/logrotate.d/shorewall-lite rm -f ${CONFDIR}/logrotate.d/shorewall-lite
rm -f ${MANDIR}/man5/shorewall-lite*
rm -f ${MANDIR}/man8/shorewall-lite*
echo "Shorewall Lite Uninstalled" echo "Shorewall Lite Uninstalled"

View File

@ -162,18 +162,24 @@ fi
rm -f ${SBINDIR}/shorewall rm -f ${SBINDIR}/shorewall
if [ -f "$INITSCRIPT" ]; then if [ -L ${SHAREDIR}/shorewall6/init ]; then
FIREWALL=$(readlink -m -q ${SHAREDIR}/shorewall6/init)
elif [ -n "$INITFILE" ]; then
FIREWALL=${INITDIR}/${INITFILE}
fi
if [ -f "$FIREWALL" ]; then
if [ $configure -eq 1 ]; then if [ $configure -eq 1 ]; then
if mywhich updaterc.d ; then if mywhich updaterc.d ; then
updaterc.d ${PRODUCT} remove updaterc.d ${PRODUCT} remove
elif mywhich insserv ; then elif mywhich insserv ; then
insserv -r $INITSCRIPT insserv -r $FIREWALL
elif mywhich chkconfig ; then elif mywhich chkconfig ; then
chkconfig --del $(basename $INITSCRIPT) chkconfig --del $(basename $FIREWALL)
fi fi
fi fi
remove_file $INITSCRIPT remove_file $FIREWALL
fi fi
if [ -n "$SYSTEMD" ]; then if [ -n "$SYSTEMD" ]; then

View File

@ -152,12 +152,12 @@ echo "Uninstalling Shorewall Lite $VERSION"
[ -n "$SANDBOX" ] && configure=0 [ -n "$SANDBOX" ] && configure=0
if [ $configure -eq 1 ]; then if [ $configure -eq 1 ]; then
if qt ip6tables -L shorewall -n && [ ! -f ${SBINDIR)/shorewall6 ]; then if qt ip6tables -L shorewall -n && [ ! -f ${SBINDIR}/shorewall6 ]; then
${SBINDIR}/shorewall6-lite clear ${SBINDIR}/shorewall6-lite clear
fi fi
fi fi
if [ -l ${SHAREDIR}/shorewall6-lite/init ]; then if [ -f ${SHAREDIR}/shorewall6-lite/init ]; then
FIREWALL=$(readlink -m -q ${SHAREDIR}/shorewall6-lite/init) FIREWALL=$(readlink -m -q ${SHAREDIR}/shorewall6-lite/init)
elif [ -n "$INITFILE" ]; then elif [ -n "$INITFILE" ]; then
FIREWALL=${INITDIR}/${INITFILE} FIREWALL=${INITDIR}/${INITFILE}
@ -192,6 +192,9 @@ rm -rf ${LIBEXEC}/shorewall6-lite
rm -f ${CONFDIR}/logrotate.d/shorewall6-lite rm -f ${CONFDIR}/logrotate.d/shorewall6-lite
[ -n "$SYSTEMD" ] && rm -f ${SYSTEMD}/shorewall6-lite.service [ -n "$SYSTEMD" ] && rm -f ${SYSTEMD}/shorewall6-lite.service
rm -f ${MANDIR}/man5/shorewall6-lite*
rm -f ${MANDIR}/man8/shorewall6-lite*
echo "Shorewall6 Lite Uninstalled" echo "Shorewall6 Lite Uninstalled"