[package] shorewall-lite: add missing lsm script
[openwrt/svn-archive/archive.git] / net / shorewall-lite / files / lsm_script
1 #!/bin/sh
2
3 STATE=${1}
4 NAME=${2}
5 CHECKIP=${3}
6 DEVICE=${4}
7 WARN_EMAIL=${5}
8 REPLIED=${6}
9 WAITING=${7}
10 TIMEOUT=${8}
11 REPLY_LATE=${9}
12 CONS_RCVD=${10}
13 CONS_WAIT=${11}
14 CONS_MISS=${12}
15 AVG_RTT=${13}
16
17 if [ -f /usr/share/shorewall-lite/lib.base ]; then
18 VARDIR=/var/lib/shorewall-lite
19 STATEDIR=/etc/shorewall-lite
20 else
21 VARDIR=/var/lib/shorewall
22 STATEDIR=/etc/shorewall
23 fi
24
25 [ -f ${STATEDIR}/vardir ] && . ${STATEDIR}/vardir
26
27 [ ${STATE} = up ] && state=0 || state=1
28
29 echo $state > ${VARDIR}/${DEVICE}.status
30
31 /sbin/shorewall-lite restart -f >> /var/log/lsm 2>&1
32
33 /sbin/shorewall-lite show routing >> /var/log/lsm