packages/net/ez-ipupdate/files/ez-ipupdate.hotplug

15 lines
359 B
Plaintext
Raw Normal View History

NAME=ez-ipupdate
CONFIG=/etc/$NAME.conf
COMMAND=/usr/sbin/$NAME
[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && {
[ -x $COMMAND ] && [ -r $CONFIG ] && {
include /lib/network
scan_interfaces
config_get ifname wan ifname
[ -n "$ifname" ] && \
$COMMAND -c $CONFIG -i $ifname 2>&1 | logger -t $NAME
} &
}