From 24218934f85e186b55a7625e861267c470d21713 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 30 Sep 2013 15:42:58 -0700 Subject: [PATCH] Clean up uninstall scripts Signed-off-by: Tom Eastep --- Shorewall-init/uninstall.sh | 1 + Shorewall/uninstall.sh | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/Shorewall-init/uninstall.sh b/Shorewall-init/uninstall.sh index 835c3aa99..1170badc6 100755 --- a/Shorewall-init/uninstall.sh +++ b/Shorewall-init/uninstall.sh @@ -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-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-down.d/shorewall diff --git a/Shorewall/uninstall.sh b/Shorewall/uninstall.sh index 6940585e7..35e2cb012 100755 --- a/Shorewall/uninstall.sh +++ b/Shorewall/uninstall.sh @@ -116,8 +116,28 @@ fi 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 ${CONFDIR}/shorewall + +if [ -n "$SYSCONFDIR" ]; then + [ -n "$SYSCONFFILE" ] || SYSCONFFILE=${PRODUCT}; + rm -f ${SYSCONFDIR}/${SYSCONFFILE} +fi + rm -rf ${VARDIR}/shorewall rm -rf ${PERLLIB}/Shorewall/* rm -rf ${LIBEXEC}/shorewall