forked from extern/shorewall_code
Some fixes to the Fedora Shorewall-init init script
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
353915fc8b
commit
156fa5ab01
@ -14,13 +14,8 @@
|
|||||||
# prior to bringing up the network.
|
# prior to bringing up the network.
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
#determine where the files were installed
|
#determine where the files were installed
|
||||||
if [ -f ~/.shorewallrc ]; then
|
|
||||||
. ~/.shorewallrc || exit 1
|
. /usr/share/shorewall/shorewallrc
|
||||||
else
|
|
||||||
SBINDIR=/sbin
|
|
||||||
SYSCONFDIR=/etc/default
|
|
||||||
VARDIR=/var/lib
|
|
||||||
fi
|
|
||||||
|
|
||||||
prog="shorewall-init"
|
prog="shorewall-init"
|
||||||
logger="logger -i -t $prog"
|
logger="logger -i -t $prog"
|
||||||
@ -56,7 +51,7 @@ start () {
|
|||||||
if [ -x ${VARDIR}/$product/firewall ]; then
|
if [ -x ${VARDIR}/$product/firewall ]; then
|
||||||
${VARDIR}/$product/firewall stop 2>&1 | $logger
|
${VARDIR}/$product/firewall stop 2>&1 | $logger
|
||||||
retval=${PIPESTATUS[0]}
|
retval=${PIPESTATUS[0]}
|
||||||
[ retval -ne 0 ] && break
|
[ $retval -ne 0 ] && break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -80,7 +75,7 @@ stop () {
|
|||||||
if [ -x ${VARDIR}/$product/firewall ]; then
|
if [ -x ${VARDIR}/$product/firewall ]; then
|
||||||
${VARDIR}/$product/firewall clear 2>&1 | $logger
|
${VARDIR}/$product/firewall clear 2>&1 | $logger
|
||||||
retval=${PIPESTATUS[0]}
|
retval=${PIPESTATUS[0]}
|
||||||
[ retval -ne 0 ] && break
|
[ $retval -ne 0 ] && break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -119,7 +114,7 @@ case "$1" in
|
|||||||
status $prog
|
status $prog
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: /etc/init.d/shorewall-init {start|stop}"
|
echo "Usage: /etc/init.d/shorewall-init {start|stop|status}"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user