From 6a3ba63e601fd86776001fdcba952b4099c208a0 Mon Sep 17 00:00:00 2001 From: nico Date: Wed, 9 Nov 2011 23:25:17 +0000 Subject: [PATCH] packages/howl: use new service functions git-svn-id: svn://svn.openwrt.org/openwrt/packages@28904 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- libs/howl/Makefile | 8 ++++---- libs/howl/files/autoipd.init | 15 ++++++--------- libs/howl/files/mDNSResponder.init | 13 +++++-------- libs/howl/files/nifd.init | 13 +++++-------- 4 files changed, 20 insertions(+), 29 deletions(-) diff --git a/libs/howl/Makefile b/libs/howl/Makefile index 459f83834..c21b7a8ff 100644 --- a/libs/howl/Makefile +++ b/libs/howl/Makefile @@ -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:=howl PKG_VERSION:=1.0.0 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.porchdogsoft.com/download/ @@ -117,7 +117,7 @@ define Package/howl-autoipd/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/autoipd $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_DATA) ./files/autoipd.init $(1)/etc/init.d/autoipd + $(INSTALL_BIN) ./files/autoipd.init $(1)/etc/init.d/autoipd endef define Package/howl-mdnsresponder/install @@ -133,7 +133,7 @@ define Package/howl-nifd/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nifd $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_DATA) ./files/nifd.init $(1)/etc/init.d/nifd + $(INSTALL_BIN) ./files/nifd.init $(1)/etc/init.d/nifd endef define Package/howl-utils/install diff --git a/libs/howl/files/autoipd.init b/libs/howl/files/autoipd.init index e68ee776c..4a8ec07d4 100644 --- a/libs/howl/files/autoipd.init +++ b/libs/howl/files/autoipd.init @@ -1,18 +1,15 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2011 OpenWrt.org + START=50 -DEFAULT=/etc/default/autopid -RUN_D=/var/run -PID_F=$RUN_D/autoipd.pid +# XXX: pid-file is /var/run/autoipd-.pid +SERVICE_USE_PID= start() { - [ -f $DEFAULT ] && . $DEFAULT - [ -d $RUN_D ] || mkdir -p $RUN_D - autoipd $OPTIONS + service_start /usr/sbin/autoipd } - stop() { - [ -f $PID_F ] && kill $(cat $PID_F) + service_stop /usr/sbin/autoipd } diff --git a/libs/howl/files/mDNSResponder.init b/libs/howl/files/mDNSResponder.init index a1f65084f..d43fdb5d7 100644 --- a/libs/howl/files/mDNSResponder.init +++ b/libs/howl/files/mDNSResponder.init @@ -1,17 +1,14 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2011 OpenWrt.org + START=50 -DEFAULT=/etc/default/mDNSResponder -RUN_D=/var/run -PID_F=$RUN_D/mDNSResponder.pid +SERVICE_USE_PID=1 start() { - [ -f $DEFAULT ] && . $DEFAULT - [ -d $RUN_D ] || mkdir -p $RUN_D - mDNSResponder $OPTIONS + service_start /usr/sbin/mDNSResponder } stop() { - [ -f $PID_F ] && kill $(cat $PID_F) + service_stop /usr/sbin/mDNSResponder } diff --git a/libs/howl/files/nifd.init b/libs/howl/files/nifd.init index d650648e5..376eaaf7f 100644 --- a/libs/howl/files/nifd.init +++ b/libs/howl/files/nifd.init @@ -1,17 +1,14 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2011 OpenWrt.org + START=50 -DEFAULT=/etc/default/nifd -RUN_D=/var/run -PID_F=$RUN_D/nifd.pid +SERVICE_USE_PID=1 start() { - [ -f $DEFAULT ] && . $DEFAULT - [ -d $RUN_D ] || mkdir -p $RUN_D - nifd $OPTIONS + service_start /usr/sbin/nifd } stop() { - [ -f $PID_F ] && kill $(cat $PID_F) + service_stop /usr/sbin/nifd }