PREUN
/bin/sh
if [ "$1" = "0" ]; then
/sbin/chkconfig --del firewall
fi
POSTIN
/bin/sh
echo -n "Trying to identify which userspace tool do you use... "
echo -ne "\n#USERSPACE_TOOL=" >> /etc/sysconfig/firewall
if [ -f /usr/sbin/iptables -o -f /sbin/iptables ]; then
echo "iptables"
echo "iptables" >> /etc/sysconfig/firewall
elif [ -f /sbin/ipchains -o -f /usr/sbin/ipchains ]; then
echo "ipchains"
echo "ipchains" >> /etc/sysconfig/firewall
else
echo "failed!"
echo "unknown" >> /etc/sysconfig/firewall
fi
echo "You should modify /etc/sysconfig/firewall"
/sbin/chkconfig --add firewall