fix default interface for ez-ipupdate (#835)

git-svn-id: svn://svn.openwrt.org/openwrt/packages@5170 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2006-10-16 23:01:17 +00:00
parent e6a87a593f
commit dc7238bdf2

View File

@ -4,7 +4,11 @@ COMMAND=/usr/sbin/$NAME
[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && {
[ -x $COMMAND ] && [ -r $CONFIG ] && {
eval "ifname=\"\${${INTERFACE}_ifname}\""
$COMMAND -c $CONFIG -i $ifname 2>&1 | logger -t $NAME
include /lib/network
scan_interfaces
config_get ifname wan ifname
[ -n "$ifname" ] && \
$COMMAND -c $CONFIG -i $ifname 2>&1 | logger -t $NAME
} &
}