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 c305458b1a632ce0ff53894df5ebb7f30e184219..352c404486ca498d9d16cecadb470a45085b2e2f 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
         } &
 }