Changeset 28926


Ignore:
Timestamp:
2011-11-10T00:49:21+01:00 (5 years ago)
Author:
nico
Message:

packages/ptrtd: use new service functions

Location:
packages/ipv6/ptrtd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/ipv6/ptrtd/Makefile

    r16438 r28926  
    11#  
    2 # Copyright (C) 2006 OpenWrt.org 
     2# Copyright (C) 2006-2011 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    1010PKG_NAME:=ptrtd 
    1111PKG_VERSION:=0.5.2 
    12 PKG_RELEASE:=1 
     12PKG_RELEASE:=2 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
  • packages/ipv6/ptrtd/files/ptrtd.init

    r6500 r28926  
    11#!/bin/sh /etc/rc.common 
    2 # Copyright (C) 2006 OpenWrt.org 
     2# Copyright (C) 2006-2011 OpenWrt.org 
    33 
    44START=60 
    5 BIN=ptrtd 
    6 RUN_D=/var/run 
    7 PID_F=$RUN_D/$BIN.pid 
    85 
    96PREFIX="3ffe:abcd:1234:9876::" 
    107LEN=64 
    118 
    12  
    139start() { 
    14         mkdir -p $RUN_D 
    15         $BIN -p $PREFIX -l $LEN 
     10        service_start /usr/sbin/ptrtd -p $PREFIX -l $LEN 
    1611} 
    1712 
    1813stop() { 
    19         [ -f $PID_F ] && kill $(cat $PID_F) 
     14        service_stop /usr/sbin/ptrtd 
    2015} 
    21  
    22 restart() { 
    23         stop 
    24         sleep 1 
    25         start 
    26 } 
Note: See TracChangeset for help on using the changeset viewer.