[packages] updatedd: use network.sh to find device names
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 28 May 2012 15:12:00 +0000 (15:12 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 28 May 2012 15:12:00 +0000 (15:12 +0000)
SVN-Revision: 31945

net/updatedd/Makefile
net/updatedd/files/updatedd.hotplug

index 3bb15ba4721585c435ab83b8ff939b8a5f6b9fc0..8f0629250c82a3b4c64766a99f5ca9b371bf3094 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2011 OpenWrt.org
+# Copyright (C) 2007-2012 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=updatedd
 PKG_VERSION:=2.6
-PKG_RELEASE:=8
+PKG_RELEASE:=9
 
 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.bz2
index 4ae12a040e1008ddf7117b0a975dcbcbc76b8411..a91802553f07d30626e698e2571c0274c8b10cef 100644 (file)
@@ -3,13 +3,12 @@ CONFIG=/etc/config/$NAME
 COMMAND=/usr/bin/$NAME
 
 [ "$ACTION" = "ifup" ] && {
-        [ -x $COMMAND ] && [ -r $CONFIG ] && {
-                                include /lib/network
-                                scan_interfaces
+       [ -x $COMMAND ] && [ -r $CONFIG ] && {
+               . /lib/functions/network.sh
 
-                                config_get ifname wan ifname
-                                [ -n "$ifname" ] && {
-                                       /etc/init.d/updatedd restart
-                               }
-        } &
+               local device
+               network_get_device device wan && {
+                       /etc/init.d/updatedd restart
+               }
+       } &
 }