Add initscript for conntrackd
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 6 Jan 2019 08:59:25 +0000 (08:59 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 6 Jan 2019 08:59:25 +0000 (08:59 +0000)
The daemon will be started by default when a configuration
file exists.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/common/aarch64/initscripts
config/rootfiles/common/armv5tel/initscripts
config/rootfiles/common/i586/initscripts
config/rootfiles/common/x86_64/initscripts
config/rootfiles/core/127/filelists/files
lfs/initscripts
src/initscripts/system/conntrackd [new file with mode: 0755]

index 18adeea..367a0a7 100644 (file)
@@ -12,6 +12,7 @@ etc/rc.d/init.d/checkfs
 etc/rc.d/init.d/cleanfs
 etc/rc.d/init.d/collectd
 etc/rc.d/init.d/connectd
+etc/rc.d/init.d/conntrackd
 etc/rc.d/init.d/console
 etc/rc.d/init.d/dhcp
 etc/rc.d/init.d/dhcrelay
@@ -103,6 +104,7 @@ etc/rc.d/rc0.d/K45random
 etc/rc.d/rc0.d/K47setclock
 etc/rc.d/rc0.d/K49cyrus-sasl
 etc/rc.d/rc0.d/K51vnstat
+etc/rc.d/rc0.d/K77conntrackd
 etc/rc.d/rc0.d/K78snort
 etc/rc.d/rc0.d/K79leds
 etc/rc.d/rc0.d/K79unbound
@@ -131,6 +133,7 @@ etc/rc.d/rc3.d/S19smartenabler
 etc/rc.d/rc3.d/S19wlanclient
 etc/rc.d/rc3.d/S20network
 etc/rc.d/rc3.d/S21leds
+etc/rc.d/rc3.d/S22conntrackd
 etc/rc.d/rc3.d/S24cyrus-sasl
 etc/rc.d/rc3.d/S30sshd
 etc/rc.d/rc3.d/S32apache
@@ -154,6 +157,7 @@ etc/rc.d/rc6.d/K45random
 etc/rc.d/rc6.d/K47setclock
 etc/rc.d/rc6.d/K49cyrus-sasl
 etc/rc.d/rc6.d/K51vnstat
+etc/rc.d/rc6.d/K77conntrackd
 etc/rc.d/rc6.d/K78snort
 etc/rc.d/rc6.d/K79leds
 etc/rc.d/rc6.d/K79unbound
index 18adeea..367a0a7 100644 (file)
@@ -12,6 +12,7 @@ etc/rc.d/init.d/checkfs
 etc/rc.d/init.d/cleanfs
 etc/rc.d/init.d/collectd
 etc/rc.d/init.d/connectd
+etc/rc.d/init.d/conntrackd
 etc/rc.d/init.d/console
 etc/rc.d/init.d/dhcp
 etc/rc.d/init.d/dhcrelay
@@ -103,6 +104,7 @@ etc/rc.d/rc0.d/K45random
 etc/rc.d/rc0.d/K47setclock
 etc/rc.d/rc0.d/K49cyrus-sasl
 etc/rc.d/rc0.d/K51vnstat
+etc/rc.d/rc0.d/K77conntrackd
 etc/rc.d/rc0.d/K78snort
 etc/rc.d/rc0.d/K79leds
 etc/rc.d/rc0.d/K79unbound
@@ -131,6 +133,7 @@ etc/rc.d/rc3.d/S19smartenabler
 etc/rc.d/rc3.d/S19wlanclient
 etc/rc.d/rc3.d/S20network
 etc/rc.d/rc3.d/S21leds
+etc/rc.d/rc3.d/S22conntrackd
 etc/rc.d/rc3.d/S24cyrus-sasl
 etc/rc.d/rc3.d/S30sshd
 etc/rc.d/rc3.d/S32apache
@@ -154,6 +157,7 @@ etc/rc.d/rc6.d/K45random
 etc/rc.d/rc6.d/K47setclock
 etc/rc.d/rc6.d/K49cyrus-sasl
 etc/rc.d/rc6.d/K51vnstat
+etc/rc.d/rc6.d/K77conntrackd
 etc/rc.d/rc6.d/K78snort
 etc/rc.d/rc6.d/K79leds
 etc/rc.d/rc6.d/K79unbound
index 7b2c1c5..6f9868e 100644 (file)
@@ -12,6 +12,7 @@ etc/rc.d/init.d/checkfs
 etc/rc.d/init.d/cleanfs
 etc/rc.d/init.d/collectd
 etc/rc.d/init.d/connectd
+etc/rc.d/init.d/conntrackd
 etc/rc.d/init.d/console
 etc/rc.d/init.d/dhcp
 etc/rc.d/init.d/dhcrelay
@@ -102,6 +103,7 @@ etc/rc.d/rc0.d/K45random
 etc/rc.d/rc0.d/K47setclock
 etc/rc.d/rc0.d/K49cyrus-sasl
 etc/rc.d/rc0.d/K51vnstat
+etc/rc.d/rc0.d/K77conntrackd
 etc/rc.d/rc0.d/K78snort
 etc/rc.d/rc0.d/K79leds
 etc/rc.d/rc0.d/K79unbound
@@ -130,6 +132,7 @@ etc/rc.d/rc3.d/S19wlanclient
 etc/rc.d/rc3.d/S20network
 etc/rc.d/rc3.d/S11unbound
 etc/rc.d/rc3.d/S21leds
+etc/rc.d/rc3.d/S22conntrackd
 etc/rc.d/rc3.d/S24cyrus-sasl
 etc/rc.d/rc3.d/S30sshd
 etc/rc.d/rc3.d/S32apache
@@ -153,6 +156,7 @@ etc/rc.d/rc6.d/K45random
 etc/rc.d/rc6.d/K47setclock
 etc/rc.d/rc6.d/K49cyrus-sasl
 etc/rc.d/rc6.d/K51vnstat
+etc/rc.d/rc6.d/K77conntrackd
 etc/rc.d/rc6.d/K78snort
 etc/rc.d/rc6.d/K79leds
 etc/rc.d/rc6.d/K79unbound
index 7b2c1c5..6f9868e 100644 (file)
@@ -12,6 +12,7 @@ etc/rc.d/init.d/checkfs
 etc/rc.d/init.d/cleanfs
 etc/rc.d/init.d/collectd
 etc/rc.d/init.d/connectd
+etc/rc.d/init.d/conntrackd
 etc/rc.d/init.d/console
 etc/rc.d/init.d/dhcp
 etc/rc.d/init.d/dhcrelay
@@ -102,6 +103,7 @@ etc/rc.d/rc0.d/K45random
 etc/rc.d/rc0.d/K47setclock
 etc/rc.d/rc0.d/K49cyrus-sasl
 etc/rc.d/rc0.d/K51vnstat
+etc/rc.d/rc0.d/K77conntrackd
 etc/rc.d/rc0.d/K78snort
 etc/rc.d/rc0.d/K79leds
 etc/rc.d/rc0.d/K79unbound
@@ -130,6 +132,7 @@ etc/rc.d/rc3.d/S19wlanclient
 etc/rc.d/rc3.d/S20network
 etc/rc.d/rc3.d/S11unbound
 etc/rc.d/rc3.d/S21leds
+etc/rc.d/rc3.d/S22conntrackd
 etc/rc.d/rc3.d/S24cyrus-sasl
 etc/rc.d/rc3.d/S30sshd
 etc/rc.d/rc3.d/S32apache
@@ -153,6 +156,7 @@ etc/rc.d/rc6.d/K45random
 etc/rc.d/rc6.d/K47setclock
 etc/rc.d/rc6.d/K49cyrus-sasl
 etc/rc.d/rc6.d/K51vnstat
+etc/rc.d/rc6.d/K77conntrackd
 etc/rc.d/rc6.d/K78snort
 etc/rc.d/rc6.d/K79leds
 etc/rc.d/rc6.d/K79unbound
index cb705e3..691abb5 100644 (file)
@@ -4,7 +4,11 @@ etc/modprobe.d/framebuffer.conf
 srv/web/ipfire/cgi-bin/credits.cgi
 var/ipfire/langs
 etc/rc.d/init.d/aws
+etc/rc.d/init.d/conntrackd
 etc/rc.d/init.d/unbound
+etc/rc.d/rc0.d/K77conntrackd
+etc/rc.d/rc3.d/S22conntrackd
+etc/rc.d/rc6.d/K77conntrackd
 srv/web/ipfire/cgi-bin/dnsforward.cgi
 srv/web/ipfire/cgi-bin/ids.cgi
 srv/web/ipfire/cgi-bin/ovpnmain.cgi
index bdab03d..c053b71 100644 (file)
@@ -155,6 +155,9 @@ $(TARGET) :
        ln -sf ../init.d/leds        /etc/rc.d/rc3.d/S21leds
        ln -sf ../init.d/leds        /etc/rc.d/rc6.d/K79leds
        ln -sf ../init.d/fireinfo    /etc/rc.d/rc3.d/S15fireinfo
+       ln -sf ../init.d/conntrackd  /etc/rc.d/rc0.d/K77conntrackd
+       ln -sf ../init.d/conntrackd  /etc/rc.d/rc3.d/S22conntrackd
+       ln -sf ../init.d/conntrackd  /etc/rc.d/rc6.d/K77conntrackd
        ln -sf ../init.d/mountkernfs /etc/rc.d/rcsysinit.d/S00mountkernfs
        ln -sf ../init.d/sysctl      /etc/rc.d/rcsysinit.d/S01sysctl
        ln -sf ../init.d/modules     /etc/rc.d/rcsysinit.d/S05modules
diff --git a/src/initscripts/system/conntrackd b/src/initscripts/system/conntrackd
new file mode 100755 (executable)
index 0000000..2e7a267
--- /dev/null
@@ -0,0 +1,41 @@
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/conntrackd
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+case "${1}" in
+       start)
+               # Don't attempt to launch the daemon when we have no configuration
+               if [ ! -s "/etc/conntrackd/conntrackd.conf" ]; then
+                       exit 0
+               fi
+
+               boot_mesg "Starting Connection Tracking Daemon..."
+               loadproc /usr/sbin/conntrackd -d
+               ;;
+
+       stop)
+               boot_mesg "Stopping Connection Tracking Daemon..."
+               killproc /usr/sbin/conntrackd
+               ;;
+
+       restart)
+               ${0} stop
+               sleep 1
+               ${0} start
+               ;;
+
+       status)
+               statusproc /usr/sbin/conntrackd
+               ;;
+
+       *)
+               echo "Usage: ${0} {start|stop|restart|status}"
+               exit 1
+               ;;
+esac
+
+# End $rc_base/init.d/conntrackd