[package] fix dibbler-server pid creation (#6906)
authorFlorian Fainelli <florian@openwrt.org>
Sat, 27 Mar 2010 13:55:09 +0000 (13:55 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sat, 27 Mar 2010 13:55:09 +0000 (13:55 +0000)
SVN-Revision: 20512

ipv6/dibbler/Makefile
ipv6/dibbler/files/dibbler.init [new file with mode: 0644]

index 09ddecb..6acf8a4 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dibbler
 PKG_VERSION:=0.7.3
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz
 PKG_SOURCE_URL:=http://klub.com.pl/dhcpv6/dibbler/
@@ -138,6 +138,8 @@ endef
 define Package/dibbler-server/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/dibbler-server $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/dibbler.init $(1)/etc/init.d/
 endef
 
 $(eval $(call BuildPackage,dibbler-poslib))
diff --git a/ipv6/dibbler/files/dibbler.init b/ipv6/dibbler/files/dibbler.init
new file mode 100644 (file)
index 0000000..e6ab3e3
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh /etc/rc.common
+START=90
+STOP=90
+
+start() {
+       [ -d /var/lib/dibbler ] || mkdir -p /var/lib/dibbler
+       dibbler-server
+}
+
+stop() {
+       killall -9 dibbler-server
+}