packages/iodine: use new service functions
authorNicolas Thill <nico@openwrt.org>
Sun, 13 Nov 2011 22:15:45 +0000 (22:15 +0000)
committerNicolas Thill <nico@openwrt.org>
Sun, 13 Nov 2011 22:15:45 +0000 (22:15 +0000)
SVN-Revision: 29059

net/iodine/Makefile
net/iodine/files/iodined.init

index 05e4743578fe8739bc22c82ed5184e38ba5b7961..bf6bdafeae1661234c75f2b10d6fd5b976ec1b8b 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006-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:=iodine
 PKG_VERSION:=0.6.0-rc1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://code.kryo.se/iodine/
index 1eac807661cbf7dcd9db0ab864597f87ddffda48..d91b7793ef1f1a89eae28ba6498f049a87f4d61d 100644 (file)
@@ -1,22 +1,23 @@
 #!/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 address  "$section" address
-       config_get password "$section" password
-       config_get tunnelip "$section" tunnelip
-       config_get tld      "$section" tld
+       config_get address  "$section" 'address'
+       config_get password "$section" 'password'
+       config_get tunnelip "$section" 'tunnelip'
+       config_get tld      "$section" 'tld'
        
-       iodined -l $address -P $password $tunnelip $tld
+       service_start /usr/sbin/iodined -l "$address" -P "$password" "$tunnelip" "$tld"
 }
 
 start() {
-       config_load "iodined"
-       config_foreach start_service iodined
+       config_load 'iodined'
+       config_foreach start_instance 'iodined'
 }
 
 stop() {
-       killall iodined
+       service_stop /usr/sbin/iodined
 }