#!/sbin/runscript # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-firewall/sanewall/files/sanewall.initd,v 1.1 2013/06/15 11:07:43 radhermit Exp $ extra_commands="save panic try" extra_started_commands="reload" depend() { need localmount after bootmisc before net provide firewall } start_pre() { if [ ! -f ${SANEWALL_CONFIG} ]; then eerror "Not starting sanewall, missing config file ${SANEWALL_CONFIG}." return 1 fi } start() { ebegin "Starting sanewall" /usr/sbin/sanewall ${SANEWALL_CONFIG} start >/dev/null eend $? } stop() { ebegin "Stopping sanewall" /usr/sbin/sanewall stop >/dev/null eend $? } try() { ebegin "Trying sanewall configuration" /usr/sbin/sanewall ${SANEWALL_CONFIG} try eend $? } status() { ebegin "Showing sanewall status" /usr/sbin/sanewall status eend $? } panic() { ebegin "sanewall panic" /usr/sbin/sanewall panic eend $? } save() { ebegin "Saving sanewall configuration" /usr/sbin/sanewall save eend $? }