From: Michael Tremer Date: Sun, 8 Feb 2009 18:30:30 +0000 (+0100) Subject: Added an initscript for "firewall". X-Git-Tag: v3.0-alpha1~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e45128a591d027a1f755f659c921d7d96c5c4de3;p=ipfire-3.x.git Added an initscript for "firewall". --- diff --git a/lfs/initscripts b/lfs/initscripts index cd8790407..1c9f23c70 100644 --- a/lfs/initscripts +++ b/lfs/initscripts @@ -35,6 +35,7 @@ OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) SCRIPTS = \ checkfs \ cleanfs \ + firewall \ haldaemon \ halt \ lighttpd \ diff --git a/src/initscripts/core/firewall b/src/initscripts/core/firewall new file mode 100644 index 000000000..62bac34bc --- /dev/null +++ b/src/initscripts/core/firewall @@ -0,0 +1,59 @@ +#!/bin/sh +# Begin /etc/init.d/firewall + +### BEGIN INIT INFO +# Provides: firewall +# Required-Start: $network +# Should-Start: +# Required-Stop: +# Should-Stop: +# Default-Start: 3 4 5 +# Default-Stop: 0 1 2 6 +# Short-Description: IPFire Firewall Engine. +# Description: This controls the IPFire Firewall Engine. +### END INIT INFO + +. /lib/lsb/init-functions + +MESSAGE="IPFire Firewall" +BIN_FILE="/usr/bin/firewall" + +chk_stat + +case "$1" in + start) + ${BIN_FILE} start + evaluate_retval start + touch /var/lock/subsys/firewall + ;; + + stop) + ${BIN_FILE} stop + evaluate_retval stop + rm -f /var/lock/subsys/firewall + ;; + + restart) + ${BIN_FILE} restart + evaluate_retval restart + ;; + + reload) + ${BIN_FILE} reload + evaluate_retval reload + ;; + + *) + echo " Usage: ${0}{start|stop|restart|reload}" + if [ "${1}" = "status" -o "${1}" = "try-restart" ] + then + echo " Error: Unimplemented function '${1}'" + exit 3 + else + exit 2 + fi + ;; + +esac + +# End /etc/init.d/firewall