From 10b17a11a0a926e23130525cc035b5f12e06ec92 Mon Sep 17 00:00:00 2001 From: jow Date: Mon, 28 May 2012 15:31:06 +0000 Subject: [PATCH] [packages] ndyndns: use network.sh to find device names git-svn-id: svn://svn.openwrt.org/openwrt/packages@31947 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/ndyndns/Makefile | 4 ++-- net/ndyndns/files/ndyndns.init | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/net/ndyndns/Makefile b/net/ndyndns/Makefile index d846504f8..d3ace8574 100644 --- a/net/ndyndns/Makefile +++ b/net/ndyndns/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008-2011 OpenWrt.org +# Copyright (C) 2008-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:=ndyndns PKG_VERSION:=2.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://ndyndns.googlecode.com/files diff --git a/net/ndyndns/files/ndyndns.init b/net/ndyndns/files/ndyndns.init index 3373d9970..0ef1ccd98 100644 --- a/net/ndyndns/files/ndyndns.init +++ b/net/ndyndns/files/ndyndns.init @@ -1,19 +1,19 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2007-2011 OpenWrt.org +# Copyright (C) 2007-2012 OpenWrt.org START=80 -include /lib/network - start() { - scan_interfaces - config_get wan_if 'wan' 'ifname' - [ -n "$wan_if" ] || return 1 + . /lib/functions/network.sh + [ -f /etc/ndyndns/ndyndns.conf ] || { echo "$0: missing config file '/etc/ndyndns/ndyndns.conf'" 1>&2 return 1 } - service_start /usr/sbin/ndyndns -c /etc/ndyndns -f /etc/ndyndns/ndyndns.conf -i $wan_if + + local device + network_get_device device wan && \ + service_start /usr/sbin/ndyndns -c /etc/ndyndns -f /etc/ndyndns/ndyndns.conf -i $device } stop() {