From 83506d17f1e730ddb517e26c995435b18398a3b1 Mon Sep 17 00:00:00 2001 From: jow Date: Mon, 28 May 2012 15:12:00 +0000 Subject: [PATCH] [packages] updatedd: use network.sh to find device names git-svn-id: svn://svn.openwrt.org/openwrt/packages@31945 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/updatedd/Makefile | 4 ++-- net/updatedd/files/updatedd.hotplug | 15 +++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/net/updatedd/Makefile b/net/updatedd/Makefile index 3bb15ba47..8f0629250 100644 --- a/net/updatedd/Makefile +++ b/net/updatedd/Makefile @@ -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 diff --git a/net/updatedd/files/updatedd.hotplug b/net/updatedd/files/updatedd.hotplug index 4ae12a040..a91802553 100644 --- a/net/updatedd/files/updatedd.hotplug +++ b/net/updatedd/files/updatedd.hotplug @@ -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 + } + } & }