Changed files:
ipset.init -> 1.3
if [ -f $IPSET_CONFIG ]; then
show "Applying ipset rules"
/usr/sbin/ipset -X
if [ -f $IPSET_CONFIG ]; then
show "Applying ipset rules"
/usr/sbin/ipset -X
- /usr/sbin/ipset -R < $IPSET_CONFIG && ok || fail
+ /usr/sbin/ipset -R < $IPSET_CONFIG
+ RETVAL=$?
+ if [ $RETVAL = 0 ]; then
+ ok
+ else
+ fail
+ fi
touch /var/lock/subsys/ipset
fi
}
touch /var/lock/subsys/ipset
fi
}
rm -f /var/lock/subsys/ipset
}
rm -f /var/lock/subsys/ipset
}
case "$1" in
start)
start
case "$1" in
start)
start
;;
restart|force-reload)
start
;;
restart|force-reload)
start
;;
status)
/usr/sbin/ipset -L --sorted --numeric
;;
status)
/usr/sbin/ipset -L --sorted --numeric
show "Saving current rules to %s" $IPSET_CONFIG
touch $IPSET_CONFIG
chmod 600 $IPSET_CONFIG
show "Saving current rules to %s" $IPSET_CONFIG
touch $IPSET_CONFIG
chmod 600 $IPSET_CONFIG
- /usr/sbin/ipset -S > $IPSET_CONFIG && ok || fail
- exit $?
+ /usr/sbin/ipset -S > $IPSET_CONFIG
+ RETVAL=$?
+ if [ $RETVAL = 0 ]; then
+ ok
+ else
+ fail
+ fi
;;
*)
msg_usage "$0 {start|stop|restart|force-reload|status|save}"
exit 3
esac
;;
*)
msg_usage "$0 {start|stop|restart|force-reload|status|save}"
exit 3
esac