Changeset 29099


Ignore:
Timestamp:
2011-11-14T03:38:53+01:00 (6 years ago)
Author:
nico
Message:

packages/rinetd: use new service functions

Location:
packages/net/rinetd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/net/rinetd/Makefile

    r26072 r29099  
    11# 
    2 # Copyright (C) 2009 OpenWrt.org 
     2# Copyright (C) 2009-2011 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    1010PKG_NAME:=rinetd 
    1111PKG_VERSION:=0.62 
    12 PKG_RELEASE:=1 
     12PKG_RELEASE:=2 
    1313 
    1414PKG_SOURCE:=rinetd.tar.gz 
  • packages/net/rinetd/files/rinetd.init

    r18418 r29099  
    11#!/bin/sh /etc/rc.common 
    2 # rinetd init script 
    3 # Copyright (C) 2009 OpenWrt.org 
     2# Copyright (C) 2009-2011 OpenWrt.org 
    43 
    54START=80 
    65 
    7 SSD=start-stop-daemon 
    8 BIN=/usr/sbin/rinetd 
    96CFG=/var/etc/rinetd.conf 
    10 PID=/var/run/rinetd.pid 
    117 
    128common_add() { 
     
    4945 
    5046start() { 
    51         mkdir -p /var/etc /var/run 
     47        mkdir -m 0755 -p /var/etc 
     48        mkdir -m 0755 -p /var/run 
    5249         
    53         echo "# This file is autogenerated, use /etc/config/rinetd" > $CFG 
    54         config_load rinetd 
    55         config_foreach common_add common 
    56         config_foreach forward_add forwarding 
     50        echo "# This file is autogenerated, check /etc/config/rinetd" > $CFG 
     51        config_load 'rinetd' 
     52        config_foreach common_add 'common' 
     53        config_foreach forward_add 'forwarding' 
    5754 
    58         $SSD -S -q -x $BIN -- -c $CFG 
     55        service_start /usr/sbin/rinetd -c $CFG 
    5956} 
    6057 
    6158stop() { 
    62         $SSD -K -q -p $PID -x $BIN 
    63         rm -f $PID $CFG 
     59        service_stop /usr/sbin/rinetd 
    6460} 
    6561 
    6662reload() { 
    67         $SSD -K -q -p $PID -x $BIN -s 1  
     63        service_reload /usr/sbin/rinetd 
    6864} 
Note: See TracChangeset for help on using the changeset viewer.