Package: flow-tools
Followup-For: Bug #602445

Please find attached a very naive patch that I think does the job in the most
minimally invasive way possible. Ideally you should rewrite the init script
using the current dh_make skeleton or something.

-- System Information:
Debian Release: 5.0.6
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/1 CPU core)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages flow-tools depends on:
ii  libc6                  2.7-18lenny4      GNU C Library: Shared libraries
ii  libmysqlclient15off    5.0.51a-24+lenny4 MySQL database client library
ii  libpq5                 8.3.12-0lenny1    PostgreSQL C client library
ii  libwrap0               7.6.q-16          Wietse Venema's TCP wrappers libra
ii  python                 2.5.2-3           An interactive high-level object-o
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

flow-tools recommends no packages.

Versions of packages flow-tools suggests:
pn  fprobe                        <none>     (no description available)
--- flow-tools-0.68/debian/flow-tools.flow-capture.init
+++ flow-tools-0.68/debian/flow-tools.flow-capture.init
@@ -25,10 +25,10 @@
 test -f $DAEMON || exit 0
 test -f $CONFIG || exit 0
 
+pid=`pidof $DAEMON` || true
+
 case "$1" in
   start)
-       pid=`pidof $DAEMON` || true
-
        if [ "$pid" ]; then
                echo "Sorry, flow-capture is already running."
                exit 0
@@ -46,7 +46,6 @@
        ;;
   stop)
        echo -n "Stopping $DESC: "
-       pid=`pidof $DAEMON` || true
        if [ "$pid" ]; then
                kill -TERM $pid >/dev/null 2>&1
        fi
@@ -57,6 +56,15 @@
        sleep 1
        $0 start
        ;;
+  status)
+        echo -n "$NAME is "
+       if [ $pid ] ;  then
+               echo "running"
+        else
+               echo " not running."
+               exit 1
+       fi
+        ;;
   *)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start|stop|restart|force-reload}" >&2

Reply via email to