Run updaterc.d out of uninstall on Debian-based systems

This commit is contained in:
Tom Eastep 2011-01-16 13:09:02 -08:00
parent 1e92e46bf9
commit e9b3cd5b57
5 changed files with 16 additions and 6 deletions

View File

@ -65,7 +65,9 @@ echo "Uninstalling Shorewall Init $VERSION"
INITSCRIPT=/etc/init.d/shorewall-init INITSCRIPT=/etc/init.d/shorewall-init
if [ -n "$INITSCRIPT" ]; then if [ -n "$INITSCRIPT" ]; then
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then if [ -x /usr/sbin/updaterc.d ]; then
updaterc.d shorewall-init remove
elif [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
insserv -r $INITSCRIPT insserv -r $INITSCRIPT
elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then
chkconfig --del $(basename $INITSCRIPT) chkconfig --del $(basename $INITSCRIPT)

View File

@ -85,7 +85,9 @@ else
fi fi
if [ -n "$FIREWALL" ]; then if [ -n "$FIREWALL" ]; then
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then if [ -x /usr/sbin/updaterc.d ]; then
updaterc.d shorewall-lite remove
elif [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
insserv -r $FIREWALL insserv -r $FIREWALL
elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then
chkconfig --del $(basename $FIREWALL) chkconfig --del $(basename $FIREWALL)
@ -108,6 +110,6 @@ rm -rf /usr/share/shorewall-lite
rm -rf /usr/share/shorewall-lite-*.bkout rm -rf /usr/share/shorewall-lite-*.bkout
rm -f /etc/logrotate.d/shorewall-lite rm -f /etc/logrotate.d/shorewall-lite
echo "Shorewall Uninstalled" echo "Shorewall Lite Uninstalled"

View File

@ -85,7 +85,9 @@ else
fi fi
if [ -n "$FIREWALL" ]; then if [ -n "$FIREWALL" ]; then
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then if [ -x /usr/sbin/updaterc.d ]; then
updaterc.d shorewall remove
elif [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
insserv -r $FIREWALL insserv -r $FIREWALL
elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then
chkconfig --del $(basename $FIREWALL) chkconfig --del $(basename $FIREWALL)

View File

@ -73,7 +73,9 @@ else
fi fi
if [ -n "$FIREWALL" ]; then if [ -n "$FIREWALL" ]; then
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then if [ -x /usr/sbin/updaterc.d ]; then
updaterc.d shorewall6-lite remove
elif [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
insserv -r $FIREWALL insserv -r $FIREWALL
elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then
chkconfig --del $(basename $FIREWALL) chkconfig --del $(basename $FIREWALL)

View File

@ -85,7 +85,9 @@ else
fi fi
if [ -n "$FIREWALL" ]; then if [ -n "$FIREWALL" ]; then
if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then if [ -x /usr/sbin/updaterc.d ]; then
updaterc.d shorewall6 remove
elif [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then
insserv -r $FIREWALL insserv -r $FIREWALL
elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then
chkconfig --del $(basename $FIREWALL) chkconfig --del $(basename $FIREWALL)