aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-05-23 15:28:56 +0000
committerJohn Crispin <blogic@openwrt.org>2015-05-23 15:28:56 +0000
commitd5eaa130840c0090c9d03c603fab17160f6e5a6d (patch)
treea8a9a3a6f1990cc4b8180972d8cc36f2a278d5bf
parent6cf86692732580eb73f177e8dcd7bc98ffea8992 (diff)
downloadupstream-d5eaa130840c0090c9d03c603fab17160f6e5a6d.tar.gz
upstream-d5eaa130840c0090c9d03c603fab17160f6e5a6d.tar.bz2
upstream-d5eaa130840c0090c9d03c603fab17160f6e5a6d.zip
conntrack-tools: add init script for conntrackd
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45737 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/network/utils/conntrack-tools/Makefile2
-rw-r--r--package/network/utils/conntrack-tools/files/conntrackd.init17
2 files changed, 19 insertions, 0 deletions
diff --git a/package/network/utils/conntrack-tools/Makefile b/package/network/utils/conntrack-tools/Makefile
index 2c479c0849..978467b016 100644
--- a/package/network/utils/conntrack-tools/Makefile
+++ b/package/network/utils/conntrack-tools/Makefile
@@ -63,6 +63,8 @@ define Package/conntrack-tools/install
$(PKG_INSTALL_DIR)/usr/sbin/conntrack \
$(PKG_INSTALL_DIR)/usr/sbin/conntrackd \
$(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/conntrackd.init $(1)/etc/init.d/conntrackd
endef
$(eval $(call BuildPackage,conntrack-tools))
diff --git a/package/network/utils/conntrack-tools/files/conntrackd.init b/package/network/utils/conntrack-tools/files/conntrackd.init
new file mode 100644
index 0000000000..a51eb885f2
--- /dev/null
+++ b/package/network/utils/conntrack-tools/files/conntrackd.init
@@ -0,0 +1,17 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2015 OpenWrt.org
+
+START=21
+STOP=89
+
+USE_PROCD=1
+PROG="/usr/sbin/conntrackd"
+
+start_service() {
+ procd_open_instance
+
+ procd_set_param command $PROG -C /etc/conntrackd/conntrackd.conf
+ procd_set_param respawn
+
+ procd_close_instance
+}