From 35a13a17ee7303f70206092dfc78cf388b19a03c Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 5 May 2015 15:31:54 +0200 Subject: [PATCH] conntrack-tools: Dont have HTML as init script, but actual script --- recipes-extra/conntrack-tools/files/init | 192 +++-------------------- 1 file changed, 23 insertions(+), 169 deletions(-) diff --git a/recipes-extra/conntrack-tools/files/init b/recipes-extra/conntrack-tools/files/init index afee655..bce2075 100644 --- a/recipes-extra/conntrack-tools/files/init +++ b/recipes-extra/conntrack-tools/files/init @@ -1,151 +1,11 @@ - - - -meta-openembedded - Collection of OpenEmbedded layers - - - - - - - -
- - - - -
-summaryrefslogtreecommitdiffabout
- - - -
-
-
blob: bce2075a72f3545dc6a4dda34df9e26a4e15c58c (plain) - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-
#!/bin/sh
+#!/bin/sh
 #
 # /etc/init.d/conntrackd
 #
-# Maximilian Wilhelm <max@rfc2324.org>
+# Maximilian Wilhelm 
 #  -- Mon, 06 Nov 2006 18:39:07 +0100
 #
-# Roman I Khimov <khimov@altell.ru>
+# Roman I Khimov 
 #  -- Tue, 27 Oct 2009 14:34:00 +0300
 
 ### BEGIN INIT INFO
@@ -160,57 +20,57 @@
 
 export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
-NAME="conntrackd"
-DAEMON="/usr/sbin/conntrackd"
-CONFIG="/etc/conntrackd/conntrackd.conf"
-PIDFILE="/var/run/${NAME}.pid"
+NAME="conntrackd"
+DAEMON="/usr/sbin/conntrackd"
+CONFIG="/etc/conntrackd/conntrackd.conf"
+PIDFILE="/var/run/${NAME}.pid"
 
 
 # Gracefully exit if there is no daemon (debian way of life)
-if [ ! -x "${DAEMON}" ]; then
+if [ ! -x "${DAEMON}" ]; then
 	exit 0
 fi
 
 # Check for config file
 if [ ! -f /etc/conntrackd/conntrackd.conf ]; then
-	echo "Error: There is no config file for $NAME" >&2
+	echo "Error: There is no config file for $NAME" >&2
 	exit 1;
 fi
 
-case "$1" in
+case "$1" in
   start)
-        echo -n "Starting $NAME: "
+        echo -n "Starting $NAME: "
 	for i in nf_conntrack_netlink nf_conntrack_netbios_ns nf_conntrack_proto_dccp nf_conntrack_tftp \
 		nf_conntrack_sane nf_conntrack_pptp nf_conntrack_irc nf_conntrack_amanda nf_conntrack_h323 \
 		nf_conntrack_proto_udplite nf_conntrack_proto_gre nf_conntrack_proto_sctp nf_conntrack_ftp \
 		nf_conntrack_sip; do
-		modprobe $i >/dev/null 2>/dev/null &
+		modprobe $i >/dev/null 2>/dev/null &
 	done
-	start-stop-daemon --start --quiet --make-pidfile --pidfile "/var/run/${NAME}.pid" --background --exec "${DAEMON}"
+	start-stop-daemon --start --quiet --make-pidfile --pidfile "/var/run/${NAME}.pid" --background --exec "${DAEMON}"
 	RET=$?
-	if [ "$?" = "0" ]; then
+	if [ "$?" = "0" ]; then
 		sleep 2
 		# Sync with other server
 		conntrackd -n
-		echo "done."
+		echo "done."
 	else
-		echo "FAILED!"
+		echo "FAILED!"
 	fi
 	exit $RET
 	;;
   stop)
-        echo -n "Stopping $NAME:"
-	start-stop-daemon --stop --quiet --oknodo --pidfile "/var/run/${NAME}.pid" && echo "done." || echo "FAILED!"
+        echo -n "Stopping $NAME:"
+	start-stop-daemon --stop --quiet --oknodo --pidfile "/var/run/${NAME}.pid" && echo "done." || echo "FAILED!"
 	;;
   status)
-	echo -n "conntrackd "
+	echo -n "conntrackd "
 	start-stop-daemon -q -K -t -x $DAEMON
 	RET=$?
-	if [ "$RET" = "0" ]; then
+	if [ "$RET" = "0" ]; then
                 PID=`cat $PIDFILE`
-		echo "($PID) is running"
+		echo "($PID) is running"
 	else
-		echo "is not running"
+		echo "is not running"
 		exit $RET
 	fi
 	;;
@@ -220,14 +80,8 @@ case "$1" in
 	;;
 
   *)
-	echo "Usage: /etc/init.d/conntrackd {start|stop|restart}"
+	echo "Usage: /etc/init.d/conntrackd {start|stop|restart}"
 	exit 1
 esac
 
 exit 0
-
-
- -
- -