pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/41198: mailman won't restart properly after a crash!!!
>Number: 41198
>Category: pkg
>Synopsis: mailman won't restart properly after a crash!!!
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Apr 13 16:50:00 +0000 2009
>Originator: Greg A. Woods
>Release: NetBSD 4.0_STABLE
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:
Package: mailman-2.1.10
System: NetBSD 4.0_STABLE (GENERIC.MP)
Architecture: i386
Machine: i386
>Description:
mailman won't restart properly after a crash because its lock
file gets left behind but is not cleared on reboot (because it
wasn't properly configured to put it in /var/run!!!)
>How-To-Repeat:
crash your machine running mailman, reboot, and wonder why the
heck mailman didn't restart!!!
>Fix:
The best fix might be to fix mailman to put its runtime
temporary files into /var/run so that they are cleared on
reboot, but I think this will do the trick too, plus the extra
changes included will hopefully also suggest some other very
useful fixes:
Index: mailman.sh
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/mail/mailman/files/mailman.sh,v
retrieving revision 1.1
diff -u -u -r1.1 mailman.sh
--- mailman.sh 6 Sep 2004 06:29:42 -0000 1.1
+++ mailman.sh 13 Apr 2009 16:30:50 -0000
@@ -1,4 +1,4 @@
-#!@RCD_SCRIPTS_SHELL@
+#! @RCD_SCRIPTS_SHELL@
#
# $NetBSD: mailman.sh,v 1.1 2004/09/06 06:29:42 lukem Exp $
#
@@ -6,8 +6,7 @@
# REQUIRE: mail
# KEYWORD: shutdown
-if [ -f /etc/rc.subr ]
-then
+if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
fi
@@ -18,14 +17,25 @@
stop_cmd="mailman_doit stop"
restart_cmd="mailman_doit restart"
+# default flags -- (carefully) remove lock on boot
+#
+# XXX how does the user, i.e. someone familiar only with /etc/rc.d/*,
+# set "-s" for a manual restart? Perhaps "forcestart" should do it to?
+#
+if [ "${autoboot}" = "yes" ]; then
+ mailman_flags="-s"
+fi
+
mailman_doit ()
{
- ${ctl_command} $1
+ ${ctl_command} ${mailman_flags} $1
}
if [ -f /etc/rc.subr ]; then
load_rc_config $name
run_rc_command "$1"
else
+ # XXX are we still supporting non-rc.subr systems in pkgsrc!?!?!?
+ # doesn't the bootstrap stuff force install of pkgtools/rc.subr?
mailman_doit "$1"
fi
Home |
Main Index |
Thread Index |
Old Index