[packages] ndyndns: use network.sh to find device names
git-svn-id: svn://svn.openwrt.org/openwrt/packages@31947 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
2f313d45f9
commit
10b17a11a0
@ -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
|
||||
|
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user