fix default interface for ez-ipupdate (#835)
authorFelix Fietkau <nbd@openwrt.org>
Mon, 16 Oct 2006 23:01:17 +0000 (23:01 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 16 Oct 2006 23:01:17 +0000 (23:01 +0000)
SVN-Revision: 5170

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

index c305458..352c404 100644 (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
         } &
 }