You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
517 B

#!/bin/sh
DEVICE=${DEVICE:-$(/sbin/uci -p /var/state get network."$INTERFACE".ifname)}
case "$ACTION" in
ifup)
if [ "$INTERFACE" = "lan" ]; then
/usr/sbin/shorewall -6 -l start
elif [ "${INTERFACE:0:3}" = "wan" ] &&
[ "${INTERFACE:$((${#INTERFACE}-2)):2}" != "_6" ]; then
/etc/shorewall6-lite/state/firewall enable "$DEVICE"
fi
;;
ifdown)
if [ "${INTERFACE:0:3}" = "wan" ]; then
/etc/shorewall6-lite/state/firewall disable "$DEVICE"
fi
;;
esac