Improve uninstall (both script and rpm)

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2010-05-19 06:29:28 -07:00
parent 06a17c8973
commit 5a48ff978e
2 changed files with 12 additions and 2 deletions

View File

@ -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

View File

@ -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