rinetd: merge r29099
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Feb 2012 16:03:15 +0000 (16:03 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Feb 2012 16:03:15 +0000 (16:03 +0000)
SVN-Revision: 30251

net/rinetd/Makefile
net/rinetd/files/rinetd.init

index 75d05e394bf41d3bafa0273be268e54ddce99ae2..9fbb000faf0b61f0d0f1c53b831f99d4a1e71b05 100755 (executable)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2009 OpenWrt.org
+# Copyright (C) 2009-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:=rinetd
 PKG_VERSION:=0.62
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=rinetd.tar.gz
 PKG_SOURCE_URL:=http://www.boutell.com/rinetd/http
index 0cb2bbc274f9028a192e41eea4fbffa9ecee4ed2..9e1c0b93e62db8996ef25910df5637c45f58089a 100755 (executable)
@@ -1,13 +1,9 @@
 #!/bin/sh /etc/rc.common
-# rinetd init script
-# Copyright (C) 2009 OpenWrt.org
+# Copyright (C) 2009-2011 OpenWrt.org
 
 START=80
 
-SSD=start-stop-daemon
-BIN=/usr/sbin/rinetd
 CFG=/var/etc/rinetd.conf
-PID=/var/run/rinetd.pid
 
 common_add() {
        local cfg="$1"
@@ -48,21 +44,21 @@ forward_add() {
 }
 
 start() {
-       mkdir -p /var/etc /var/run
+       mkdir -m 0755 -p /var/etc
+       mkdir -m 0755 -p /var/run
        
-       echo "# This file is autogenerated, use /etc/config/rinetd" > $CFG
-       config_load rinetd
-       config_foreach common_add common
-       config_foreach forward_add forwarding
+       echo "# This file is autogenerated, check /etc/config/rinetd" > $CFG
+       config_load 'rinetd'
+       config_foreach common_add 'common'
+       config_foreach forward_add 'forwarding'
 
-       $SSD -S -q -x $BIN -- -c $CFG
+       service_start /usr/sbin/rinetd -c $CFG
 }
 
 stop() {
-       $SSD -K -q -p $PID -x $BIN
-       rm -f $PID $CFG
+       service_stop /usr/sbin/rinetd
 }
 
 reload() {
-       $SSD -K -q -p $PID -x $BIN -s 1 
+       service_reload /usr/sbin/rinetd
 }