NetBSD Problem Report #36028

From www@NetBSD.org  Sun Mar 18 12:40:47 2007
Return-Path: <www@NetBSD.org>
Received: by narn.NetBSD.org (Postfix, from userid 31301)
	id BB4A863B8C3; Sun, 18 Mar 2007 12:40:47 +0000 (UTC)
Message-Id: <20070318124047.BB4A863B8C3@narn.NetBSD.org>
Date: Sun, 18 Mar 2007 12:40:47 +0000 (UTC)
From: ishit@oak.dti.ne.jp
Reply-To: ishit@oak.dti.ne.jp
To: gnats-bugs@NetBSD.org
Subject: can not stopping use mail/postgrey rc.d file
X-Send-Pr-Version: www-1.0

>Number:         36028
>Category:       pkg
>Synopsis:       can not stopping use mail/postgrey rc.d file
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kim
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 18 12:45:01 +0000 2007
>Last-Modified:  Mon Mar 10 07:58:26 +0000 2008
>Originator:     ISIHARA Takanori
>Release:        NetBSD/amd64 2.0.3
>Organization:
Nagoya *BSD Users' Group :-)
>Environment:
NetBSD search.ombudsman.jp 2.0.3_STABLE NetBSD 2.0.3_STABLE (GENERIC.user64) #0: Sat Apr 15 11:34:15 JST 2006  root@search.ombudsman.jp:/opt/src-2-0/sys/arch/amd64/compile/obj/GENERIC.user64 amd64

>Description:
I can not stopping use mail/postgrey rc.d file.

It seems PR pkg/35334 same problem.
and other Net::Server perl module use packages have this problem. I think.

>How-To-Repeat:
/etc/rc.d/postgrey stop

>Fix:
--- files/postgrey.sh.orig      2004-12-23 00:51:38.000000000 +0900
+++ files/postgrey.sh   2007-03-18 21:30:50.000000000 +0900
@@ -21,5 +21,25 @@
 "
 @PKGBASE@_flags=${@PKGBASE@_flags-"-i 2525"}

+stop_cmd="postgrey_stop"
+
+# Net::Server breaks rc.subr's techniques for detecting whether the
+# process running at a certain PID is actually the process we wish to
+# stop.  Just unconditionally send SIGTERM to the PID instead.
+#
+postgrey_stop()
+{
+      @ECHO@ "Stopping ${name}."
+      if [ -f ${pidfile} ]; then
+              pid=`@HEAD@ -1 ${pidfile}`
+              doit="kill ${pid}"
+              if ! eval $doit && [ -z "$rc_force" ]; then
+                      return 1
+              fi
+              wait_for_pids $pid
+      fi
+      @RM@ -f ${pidfile}
+}
+
 load_rc_config $name
 run_rc_command "$1"

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->kim
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Mon, 19 Mar 2007 08:05:31 +0000
Responsible-Changed-Why:
Over to maintainer.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.