Fix up the Debian init scripts.

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9630 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
el_cubano 2009-03-09 01:05:53 +00:00
parent 08de6e2de9
commit 8628ff7d76
2 changed files with 15 additions and 15 deletions

View File

@ -28,7 +28,7 @@ test -n $INITLOG || {
if [ "$(id -u)" != "0" ] if [ "$(id -u)" != "0" ]
then then
echo "You must be root to start, stop or restart \"Shorewall firewall\"." echo "You must be root to start, stop or restart \"Shorewall6 Lite firewall\"."
exit 1 exit 1
fi fi
@ -55,8 +55,8 @@ not_configured () {
exit 0 exit 0
} }
# parse the shorewall params file in order to use params in # parse the shorewall6 params file in order to use params in
# /etc/default/shorewall # /etc/default/shorewall6
if [ -f "/etc/shorewall6-lite/params" ] if [ -f "/etc/shorewall6-lite/params" ]
then then
. /etc/shorewall6-lite/params . /etc/shorewall6-lite/params
@ -76,28 +76,28 @@ else
fi fi
# start the firewall # start the firewall
shorewall_start () { shorewall6_start () {
echo -n "Starting \"Shorewall6 Lite firewall\": " echo -n "Starting \"Shorewall6 Lite firewall\": "
$SRWL $SRWL_OPTS start >> $INITLOG 2>&1 && echo "done." || echo_notdone $SRWL $SRWL_OPTS start >> $INITLOG 2>&1 && echo "done." || echo_notdone
return 0 return 0
} }
# stop the firewall # stop the firewall
shorewall_stop () { shorewall6_stop () {
echo -n "Stopping \"Shorewall firewall\": " echo -n "Stopping \"Shorewall6 Lite firewall\": "
$SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone $SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone
return 0 return 0
} }
# restart the firewall # restart the firewall
shorewall_restart () { shorewall6_restart () {
echo -n "Restarting \"Shorewall6 Lite firewall\": " echo -n "Restarting \"Shorewall6 Lite firewall\": "
$SRWL $SRWL_OPTS restart >> $INITLOG 2>&1 && echo "done." || echo_notdone $SRWL $SRWL_OPTS restart >> $INITLOG 2>&1 && echo "done." || echo_notdone
return 0 return 0
} }
# refresh the firewall # refresh the firewall
shorewall_refresh () { shorewall6_refresh () {
echo -n "Refreshing \"Shorewall6 Lite firewall\": " echo -n "Refreshing \"Shorewall6 Lite firewall\": "
$SRWL $SRWL_OPTS refresh >> $INITLOG 2>&1 && echo "done." || echo_notdone $SRWL $SRWL_OPTS refresh >> $INITLOG 2>&1 && echo "done." || echo_notdone
return 0 return 0
@ -105,16 +105,16 @@ shorewall_refresh () {
case "$1" in case "$1" in
start) start)
shorewall_start shorewall6_start
;; ;;
stop) stop)
shorewall_stop shorewall6_stop
;; ;;
refresh) refresh)
shorewall_refresh shorewall6_refresh
;; ;;
force-reload|restart) force-reload|restart)
shorewall_restart shorewall6_restart
;; ;;
*) *)
echo "Usage: /etc/init.d/shorewall6-lite {start|stop|refresh|restart|force-reload}" echo "Usage: /etc/init.d/shorewall6-lite {start|stop|refresh|restart|force-reload}"

View File

@ -14,10 +14,10 @@
SRWL=/sbin/shorewall6 SRWL=/sbin/shorewall6
SRWL_OPTS="-tvv" SRWL_OPTS="-tvv"
WAIT_FOR_IFUP=/usr/share/shorewall/wait4ifup WAIT_FOR_IFUP=/usr/share/shorewall6/wait4ifup
# Note, set INITLOG to /dev/null if you do not want to # Note, set INITLOG to /dev/null if you do not want to
# keep logs of the firewall (not recommended) # keep logs of the firewall (not recommended)
INITLOG=/var/log/shorewall-init.log INITLOG=/var/log/shorewall6-init.log
test -x $SRWL || exit 0 test -x $SRWL || exit 0
test -x $WAIT_FOR_IFUP || exit 0 test -x $WAIT_FOR_IFUP || exit 0
@ -89,7 +89,7 @@ shorewall6_start () {
# stop the firewall # stop the firewall
shorewall6_stop () { shorewall6_stop () {
echo -n "Stopping \"Shorewall firewall\": " echo -n "Stopping \"Shorewall6 firewall\": "
$SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone $SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone
return 0 return 0
} }