Clean up uninstall scripts

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2013-09-30 15:42:58 -07:00
parent 308aaad8d4
commit 24218934f8
2 changed files with 21 additions and 0 deletions

View File

@ -140,6 +140,7 @@ remove_file ${CONFDIR}/NetworkManager/dispatcher.d/01-shorewall
remove_file ${CONFDIR}/network/if-up.d/shorewall remove_file ${CONFDIR}/network/if-up.d/shorewall
remove_file ${CONFDIR}/network/if-down.d/shorewall remove_file ${CONFDIR}/network/if-down.d/shorewall
remove_file ${CONFDIR}/network/if-post-down.d/shorewall
remove_file ${CONFDIR}/sysconfig/network/if-up.d/shorewall remove_file ${CONFDIR}/sysconfig/network/if-up.d/shorewall
remove_file ${CONFDIR}/sysconfig/network/if-down.d/shorewall remove_file ${CONFDIR}/sysconfig/network/if-down.d/shorewall

View File

@ -116,8 +116,28 @@ fi
rm -f ${SBINDIR}/shorewall rm -f ${SBINDIR}/shorewall
if [ -f "$INITSCRIPT" ]; then
if mywhich updaterc.d ; then
updaterc.d ${PRODUCT} remove
elif mywhich insserv ; then
insserv -r $INITSCRIPT
elif mywhich chkconfig ; then
chkconfig --del $(basename $INITSCRIPT)
elif mywhich systemctl ; then
systemctl disable ${PRODUCT}
fi
remove_file $INITSCRIPT
fi
rm -rf ${SHAREDIR}/shorewall/version rm -rf ${SHAREDIR}/shorewall/version
rm -rf ${CONFDIR}/shorewall rm -rf ${CONFDIR}/shorewall
if [ -n "$SYSCONFDIR" ]; then
[ -n "$SYSCONFFILE" ] || SYSCONFFILE=${PRODUCT};
rm -f ${SYSCONFDIR}/${SYSCONFFILE}
fi
rm -rf ${VARDIR}/shorewall rm -rf ${VARDIR}/shorewall
rm -rf ${PERLLIB}/Shorewall/* rm -rf ${PERLLIB}/Shorewall/*
rm -rf ${LIBEXEC}/shorewall rm -rf ${LIBEXEC}/shorewall