[pkg-fetchmail-maint] Bug#527967: init.d status support
Peter Eisentraut
petere at debian.org
Sat May 9 20:06:09 UTC 2009
Package: fetchmail
Version: 6.3.9~rc2-4+b1
Severity: wishlist
Tags: patch
User: petere at debian.org
Usertags: initd-status-support
Here is an attempted patch to support the "status" action in the init.d
script. It's a bit messy, since it tries to achive that "status" can run
usefully even as non-root and when the service is not configured. You may
want to refactor the init script somehow and choose a different solution. Let
me know if you need input.
Notes on the patch:
@@ -31,16 +31,12 @@
PIDFILE="/var/run/fetchmail/fetchmail.pid"
UIDL="/var/lib/fetchmail/.fetchmail-UIDL-cache"
-if [ ! -e $CONFFILE ]; then
- exit 0
-fi
-
test -f /etc/default/fetchmail || exit 0
. /etc/default/fetchmail
This is redundant with later code that checks if the config file is there and
gives a more qualified response.
@@ -53,7 +49,7 @@
if [ ! -r $CONFFILE ] ; then
log_failure_msg "$CONFFILE not found."
log_failure_msg "can not start fetchmail daemon... consider disabling the script"
- exit 0
+ exit 6
fi
fi
This is the correct exit code when the program is not configured, per LSB.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fetchmail_initd-status.patch
Type: text/x-diff
Size: 2399 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-fetchmail-maint/attachments/20090509/be407158/attachment-0001.patch>
More information about the pkg-fetchmail-maint
mailing list