Correct Debian Shorewall-init SysV init script.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2013-05-06 09:50:51 -07:00
parent cc72b75ba9
commit be7a6ec35d

View File

@ -106,19 +106,13 @@ shorewall_start () {
for PRODUCT in $PRODUCTS; do
setstatedir
if [ ! -x ${VARDIR}/$PRODUCT/firewall ]; then
if [ $PRODUCT = shorewall -o $PRODUCT = shorewall6 ]; then
${SBINDIR}/$PRODUCT compile
fi
fi
if [ -x ${VARDIR}/$PRODUCT/firewall ]; then
if [ -x ${STATEDIR}/$PRODUCT/firewall ]; then
#
# Run in a sub-shell to avoid name collisions
#
(
if ! ${VARDIR}/$PRODUCT/firewall status > /dev/null 2>&1; then
${VARDIR}/$PRODUCT/firewall stop || echo_notdone
if ! ${STATE}/$PRODUCT/firewall status > /dev/null 2>&1; then
${STATE}/$PRODUCT/firewall stop || echo_notdone
fi
)
fi
@ -138,14 +132,8 @@ shorewall_stop () {
for PRODUCT in $PRODUCTS; do
setstatedir
if [ ! -x ${VARDIR}/$PRODUCT/firewall ]; then
if [ $PRODUCT = shorewall -o $PRODUCT = shorewall6 ]; then
${SBINDIR}/$PRODUCT compile
fi
fi
if [ -x ${VARDIR}/$PRODUCT/firewall ]; then
${VARDIR}/$PRODUCT/firewall clear || echo_notdone
if [ -x ${STATEDIR}/$PRODUCT/firewall ]; then
${STATEDIR}/$PRODUCT/firewall clear || echo_notdone
fi
done