[pkg-fetchmail-maint] Bug#366539: show error message if trying to start a running fetchmail

Goneri Le Bouder goneri at rulezlan.org
Tue May 9 14:45:59 UTC 2006


Package: fetchmail
Version: 6.3.4-1
Severity: minor

the init.d script show a error if fetchmail is tunning and i try to
restart it.

Starting mail retrieval agent: fetchmail.
linda:/home/goneri# /etc/init.d/fetchmail stop 
Stopping mail retrieval agent: fetchmail.
linda:/home/goneri# /etc/init.d/fetchmail start
Starting mail retrieval agent: fetchmail.
linda:/home/goneri# /etc/init.d/fetchmail start
readlink: extra operand `30/exe'
Try `readlink --help' for more information.
/etc/init.d/fetchmail: line 111: [: too many arguments
Removing stale PID file /var/run/fetchmail/fetchmail.pid.
Starting mail retrieval agent: fetchmail.


strangly fetchmail.pid contain 2 lines:
linda:/home/goneri# cat /var/run/fetchmail/fetchmail.pid
14946
30



Patch to retreive the first line:
linda:/home/goneri# diff -ru /etc/init.d/fetchmail.orig /etc/init.d/fetchmail
--- /etc/init.d/fetchmail.orig  2006-05-09 16:51:04.000000000 +0000
+++ /etc/init.d/fetchmail       2006-05-09 16:54:56.000000000 +0000
@@ -106,7 +106,7 @@
 case "$1" in
        start)
                if test -e $PIDFILE ; then
-                       pid=`cat $PIDFILE | sed -e 's/\s.*//'`
+                       pid=`cat $PIDFILE | sed -e 's/\s.*//'|head -n 1`
                        PIDDIR=/proc/$pid
                    if [ -d ${PIDDIR} -a  "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then
                                echo "fetchmail already started; not starting."


Regards,


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: sparc (sparc64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-2-sparc64-smp
Locale: LANG=fr_FR at euro, LC_CTYPE=fr_FR at euro (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)




More information about the pkg-fetchmail-maint mailing list