From e13bdf0276d0bac7b06ed0cb146381e669c16c81 Mon Sep 17 00:00:00 2001 From: Nicolas Thill Date: Sun, 13 Nov 2011 22:16:07 +0000 Subject: [PATCH] packages/updatedd: use new service functions SVN-Revision: 29069 --- net/updatedd/Makefile | 4 ++-- net/updatedd/files/updatedd.init | 23 ++++++++++++----------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/net/updatedd/Makefile b/net/updatedd/Makefile index e28070ee37..3bb15ba472 100644 --- a/net/updatedd/Makefile +++ b/net/updatedd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2010 OpenWrt.org +# Copyright (C) 2007-2011 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:=7 +PKG_RELEASE:=8 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/ PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.bz2 diff --git a/net/updatedd/files/updatedd.init b/net/updatedd/files/updatedd.init index d364659008..5ae4545e2f 100644 --- a/net/updatedd/files/updatedd.init +++ b/net/updatedd/files/updatedd.init @@ -1,14 +1,15 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2011 OpenWrt.org + START=50 -start_service () { +start_instance () { local section="$1" - config_get service "$section" service - config_get username "$section" username - config_get password "$section" password - config_get host "$section" host - config_get update "$section" update + config_get service "$section" 'service' + config_get username "$section" 'username' + config_get password "$section" 'password' + config_get host "$section" 'host' + config_get update "$section" 'update' [ "$update" = 1 ] && { if [ "$service" = "dyndns" ]; then @@ -22,16 +23,16 @@ start_service () { fi fi if [ "$abusive" != "1" ]; then - /usr/bin/updatedd -Y $service -- $username:$password $host + service_start /usr/bin/updatedd -Y $service -- $username:$password $host fi } } start() { - config_load "updatedd" - config_foreach start_service updatedd + config_load 'updatedd' + config_foreach start_instance 'updatedd' } stop() { - killall updatedd + service_stop /usr/bin/updatedd } -- 2.30.2