From 55c1bbe5d81d40b3fd240c02747fde8e743ce153 Mon Sep 17 00:00:00 2001 From: nico Date: Wed, 9 Nov 2011 23:49:13 +0000 Subject: [PATCH] packages/ahcpd: use new service functions git-svn-id: svn://svn.openwrt.org/openwrt/packages@28922 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ipv6/ahcpd/Makefile | 4 ++-- ipv6/ahcpd/files/ahcpd.init | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ipv6/ahcpd/Makefile b/ipv6/ahcpd/Makefile index 19beb3074..a29e2b0fa 100644 --- a/ipv6/ahcpd/Makefile +++ b/ipv6/ahcpd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007 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:=ahcpd PKG_VERSION:=0.52 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.pps.jussieu.fr/~jch/software/files/ diff --git a/ipv6/ahcpd/files/ahcpd.init b/ipv6/ahcpd/files/ahcpd.init index bd1ecc915..6654b0062 100644 --- a/ipv6/ahcpd/files/ahcpd.init +++ b/ipv6/ahcpd/files/ahcpd.init @@ -1,7 +1,10 @@ #!/bin/sh /etc/rc.common +# Copyright (C) 2007-2011 OpenWrt.org START=71 -PID_F="/var/run/ahcpd.pid" + +SERVICE_USE_PID=1 + EXTRA_COMMANDS="status" EXTRA_HELP=" status Print ahcpd's status to the log file." @@ -94,13 +97,13 @@ start() { config_foreach ahcp_config ahcpd config_foreach ahcp_server ahcpd [ -z "$interfaces" ] && return 0 - eval "/usr/sbin/ahcpd -D -I $PID_F $args $interfaces" + service_start /usr/sbin/ahcpd -D $args $interfaces } stop() { - service_kill "ahcpd" "$PID_F" + service_stop /usr/sbin/ahcpd } status() { - [ -f $PID_F ] && kill -USR1 $(cat $PID_F) + SERVICE_SIG="USR1" service_signal /usr/sbin/ahcpd } -- 2.11.0