From 5a48ff978ee848abc85d1a06953cd407875edc4f Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Wed, 19 May 2010 06:29:28 -0700 Subject: [PATCH] Improve uninstall (both script and rpm) Signed-off-by: Tom Eastep --- Shorewall-init/shorewall-init.spec | 10 ++++++++++ Shorewall-init/uninstall.sh | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Shorewall-init/shorewall-init.spec b/Shorewall-init/shorewall-init.spec index 28cb18bfc..d649918ee 100644 --- a/Shorewall-init/shorewall-init.spec +++ b/Shorewall-init/shorewall-init.spec @@ -83,6 +83,16 @@ if [ $1 -eq 0 ]; then elif [ -x /sbin/chkconfig ]; then /sbin/chkconfig --del shorewall-init fi + + [ -f /sbin/ifup-local ] && $(ls -l /sbin/ifup-local) | grep -q /usr/share/shorewall-init && rm -f /sbin/ifup-local + [ -f /sbin/ifdown-local ] && $(ls -l /sbin/ifdown-local) | grep -q /usr/share/shorewall-init && rm -f /sbin/ifdown-local + + rm -f /etc/sysconfig/shorewall-init + + rm -f /etc/NetworkManager/dispatcher.d/01-shorewall + + rm -f /etc/sysconfig/network/if-up.d/shorewall + rm -f /etc/sysconfig/network/if-down.d/shorewall fi %files diff --git a/Shorewall-init/uninstall.sh b/Shorewall-init/uninstall.sh index b74070ea0..5d0014b1b 100755 --- a/Shorewall-init/uninstall.sh +++ b/Shorewall-init/uninstall.sh @@ -76,8 +76,8 @@ if [ -n "$INITSCRIPT" ]; then remove_file $INITSCRIPT fi -[ -f /sbin/ifup-local ] && $(ls -l /sbin/ifup-local) | grep -q /usr/share/shorewall-init && removefile /sbin/ifup-local -[ -f /sbin/ifdown-local ] && $(ls -l /sbin/ifdown-local) | grep -q /usr/share/shorewall-init && removefile /sbin/ifdown-local +[ -f /sbin/ifup-local ] && $(ls -l /sbin/ifup-local) | grep -q /usr/share/shorewall-init && remove_file /sbin/ifup-local +[ -f /sbin/ifdown-local ] && $(ls -l /sbin/ifdown-local) | grep -q /usr/share/shorewall-init && remove_file /sbin/ifdown-local remove_file /etc/default/shorewall-init remove_file /etc/sysconfig/shorewall-init