#!/bin/sh # # shorewall The Shoreline Firewall (Shorewall) Packet Filtering Firewall # # chkconfig: 2345 10 89 # # description: Packet filtering firewall # # Source function library . /etc/rc.d/init.d/functions . /usr/share/shorewall/functions # Get network config . /etc/sysconfig/network # Check that networking is up if is_yes "${NETWORKING}"; then if [ ! -f /var/lock/subsys/network ]; then msg_network_down shorewall exit 1 fi else exit 0 fi start() { if [ -f /var/lock/subsys/shorewall ]; then msg_already_running shorewall return fi msg_starting "Shorewall" deltext; ok # FIXME: use daemon and handle OK/FAIL exec /sbin/shorewall -q start >/dev/null touch /var/lock/subsys/shorewall } stop() { if [ ! -f /var/lock/subsys/shorewall ]; then msg_not_running shorewall return fi msg_stopping "Shorewall" deltext; ok # FIXME: use killproc or handle OK/FAIL manually exec /sbin/shorewall stop >/dev/null rm -f /var/lock/subsys/shorewall >/dev/null 2>&1 } # See how we were called case "$1" in start) ;; stop) ;; status) status shorewall exec /sbin/shorewall status exit $? ;; restart) stop start ;; *) msg_usage "$0 {start|stop|restart|status}" exit 3 esac