2011-02-20 16:03:59 +00:00
|
|
|
#!/bin/sh
|
2012-06-18 23:49:27 +00:00
|
|
|
#
|
|
|
|
# (C) 2009 Mika Ilmaranta <ilmis@nullnet.fi>
|
|
|
|
# (C) 2009 Tom Eastep <teastep@shorewall.net>
|
|
|
|
#
|
|
|
|
# License: GPLv2
|
|
|
|
#
|
2011-02-20 16:03:59 +00:00
|
|
|
|
|
|
|
STATE=${1}
|
|
|
|
DEVICE=${4}
|
|
|
|
|
|
|
|
if [ -f /usr/share/shorewall-lite/lib.base ]; then
|
2012-10-16 15:55:47 +00:00
|
|
|
VARDIR=/etc/shorewall-lite/state
|
2012-06-18 23:49:27 +00:00
|
|
|
STATEDIR=/etc/shorewall-lite
|
2011-02-20 16:03:59 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
[ -f ${STATEDIR}/vardir ] && . ${STATEDIR}/vardir
|
|
|
|
|
2012-06-18 23:49:27 +00:00
|
|
|
if [ ${STATE} = up ]; then
|
|
|
|
${VARDIR}/firewall enable ${DEVICE}
|
|
|
|
else
|
|
|
|
${VARDIR}/firewall disable ${DEVICE}
|
|
|
|
fi
|
2011-02-20 16:03:59 +00:00
|
|
|
|
2012-10-16 15:55:47 +00:00
|
|
|
/sbin/shorewall-lite show routing > /var/log/lsm
|
2012-06-18 23:49:27 +00:00
|
|
|
|
|
|
|
exit 0
|