add arpwatch init script (#6384)
authorFlorian Fainelli <florian@openwrt.org>
Wed, 30 Dec 2009 18:32:32 +0000 (18:32 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Wed, 30 Dec 2009 18:32:32 +0000 (18:32 +0000)
SVN-Revision: 18973

net/arpwatch/Makefile
net/arpwatch/files/arpwatch.init [new file with mode: 0644]

index 08724e4b3e423c8df68b99b0eb158064d273c129..9a7112869ff858a5383179bdeb1db3af931dbef0 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=arpwatch
 PKG_VERSION:=2.1a15
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.free.fr/.mirrors1/ftp.gentoo.org/distfiles/
@@ -52,6 +52,8 @@ define Package/arpwatch/install
        $(CP) $(PKG_BUILD_DIR)/arp.dat $(1)/etc/arpwatch/
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/arp{watch,snmp} $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/arpwatch.init $(1)/etc/init.d/arpwatch
 endef
 
 $(eval $(call BuildPackage,arpwatch))
diff --git a/net/arpwatch/files/arpwatch.init b/net/arpwatch/files/arpwatch.init
new file mode 100644 (file)
index 0000000..56d13e3
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh /etc/rc.common
+START=90
+
+start () {
+       arpwatch -f /etc/arpwatch/arp.dat -i br-lan
+}
+
+stop() {
+       killall arpwatch
+}