openwrtv3/openwrt/package/ez-ipupdate/files/ez-ipupdate.hotplug
2006-04-01 20:23:17 +00:00

10 lines
323 B
Text

. /etc/functions.sh
NAME=ez-ipupdate
CONFIG=/etc/$NAME.conf
COMMAND=/usr/sbin/$NAME
[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && {
[ -x $COMMAND ] && [ -r $CONFIG ] && {
IFNAME=$(nvram get ${INTERFACE}_ifname)
$COMMAND -c $CONFIG -i $IFNAME 2>&1 | logger -t $NAME
} &
}