]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Added an initscript for "firewall".
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 8 Feb 2009 18:30:30 +0000 (19:30 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 8 Feb 2009 18:30:30 +0000 (19:30 +0100)
lfs/initscripts
src/initscripts/core/firewall [new file with mode: 0644]

index cd8790407c90d0ea49eadf0701575d79c1680734..1c9f23c70bb13a580da2b70a7527b757fc40982c 100644 (file)
@@ -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 (file)
index 0000000..62bac34
--- /dev/null
@@ -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