From owner-svn-ports-head@FreeBSD.ORG Sun May 3 07:33:41 2015 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF0EC20C; Sun, 3 May 2015 07:33:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7FDFA1DC5; Sun, 3 May 2015 07:33:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t437Xfuj007144; Sun, 3 May 2015 07:33:41 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t437Xfqg007142; Sun, 3 May 2015 07:33:41 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201505030733.t437Xfqg007142@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Sun, 3 May 2015 07:33:41 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r385235 - in head/mail/sympa: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2015 07:33:41 -0000 Author: jbeich Date: Sun May 3 07:33:40 2015 New Revision: 385235 URL: https://svnweb.freebsd.org/changeset/ports/385235 Log: mail/sympa: fix bugs in rc.d script * Current sympa.rc not show the correct status, always active. grep with pid string also process. * The output of ps depends on the windows size. Sometime truncated /usr/local/libexec/sympa/task_manager.pl -w for avoid it. * Change ps options to BSD-sytle. PR: 199145 Submitted by: Igor Zabelin Approved by: geoffroy desvernay (maintainer) Modified: head/mail/sympa/Makefile (contents, props changed) head/mail/sympa/files/sympa.in (contents, props changed) Modified: head/mail/sympa/Makefile ============================================================================== --- head/mail/sympa/Makefile Sun May 3 07:30:32 2015 (r385234) +++ head/mail/sympa/Makefile Sun May 3 07:33:40 2015 (r385235) @@ -3,6 +3,7 @@ PORTNAME= sympa PORTVERSION= 6.1.24 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= http://www.sympa.org/distribution/ \ http://www.sympa.org/distribution/old/ Modified: head/mail/sympa/files/sympa.in ============================================================================== --- head/mail/sympa/files/sympa.in Sun May 3 07:30:32 2015 (r385234) +++ head/mail/sympa/files/sympa.in Sun May 3 07:33:40 2015 (r385235) @@ -51,7 +51,7 @@ sub_status() if [ -f /var/run/sympa/$1.pid ] ; then pid=`head -1 /var/run/sympa/$1.pid | tr -s ' ' '|'` if [ "$pid" != "" ] ; then - running=`ps -A | egrep "$pid"` + running=`ps -axw | grep "^[[:space:]]*$pid[[:space:]]"` if [ "$running" != "" ]; then echo "$1 (pid(s) $pid) is active..." return 0 @@ -115,7 +115,7 @@ sub_stop() if [ "$pids" != "" ]; then for pid in $pids; do killcount=0 - running=`ps -A | grep "^[[:space:]]*$pid[[:space:]].*$1\\.pl"` + running=`ps -axw | grep "^[[:space:]]*$pid[[:space:]].*$1\\.pl"` while [ "$running" != "" ]; do if [ $killcount -gt 10 ]; then echo 'failure' @@ -123,13 +123,13 @@ sub_stop() fi kill -TERM $pid >/dev/null 2>&1 - running=`ps -A | grep "^[[:space:]]*$pid[[:space:]].*$1\\.pl"` + running=`ps -axw | grep "^[[:space:]]*$pid[[:space:]].*$1\\.pl"` if [ "$running" = "" ]; then runcount=`expr $runcount + 1` break fi sleep 2 - running=`ps -A | grep "^[[:space:]]*$pid[[:space:]].*$1\\.pl"` + running=`ps -axw | grep "^[[:space:]]*$pid[[:space:]].*$1\\.pl"` if [ "$running" = "" ]; then runcount=`expr $runcount + 1` break