From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Mar 7 11:00:18 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79F5D16A420 for ; Tue, 7 Mar 2006 11:00:18 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A9A7E43D46 for ; Tue, 7 Mar 2006 11:00:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k27B0Hij018449 for ; Tue, 7 Mar 2006 11:00:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k27B0HBa018448; Tue, 7 Mar 2006 11:00:17 GMT (envelope-from gnats) Resent-Date: Tue, 7 Mar 2006 11:00:17 GMT Resent-Message-Id: <200603071100.k27B0HBa018448@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Shaun Amott Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B11216A420; Tue, 7 Mar 2006 10:51:29 +0000 (GMT) (envelope-from shaun@inerd.com) Received: from dione.picobyte.net (host-212-158-207-124.bulldogdsl.com [212.158.207.124]) by mx1.FreeBSD.org (Postfix) with SMTP id 870CB43D4C; Tue, 7 Mar 2006 10:51:28 +0000 (GMT) (envelope-from shaun@inerd.com) Received: from charon.picobyte.net (charon.picobyte.net [IPv6:2001:4bd0:201e::fe03]) by dione.picobyte.net (Postfix) with ESMTP; Tue, 7 Mar 2006 10:51:26 +0000 (GMT) Message-Id: <1141728558.1110@charon.picobyte.net> Date: Tue, 7 Mar 2006 10:49:18 -0000 From: Shaun Amott To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: vsevolod@FreeBSD.org Subject: ports/94163: net-im/ejabberd: Fix rc.d script X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Shaun Amott List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2006 11:00:18 -0000 >Number: 94163 >Category: ports >Synopsis: net-im/ejabberd: Fix rc.d script >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Mar 07 11:00:16 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Shaun Amott >Release: FreeBSD 5.2.1-RELEASE-p13 i386 >Organization: >Environment: FreeBSD 5.2.1-RELEASE-p13 #0: Sun Feb 13 03:06:15 GMT 2005 CUSTOM i386 >Description: The ejabberd rc script doesn't seem to work. This had me banging my head against a wall for several hours. There are two problems: 1) The ejabberd binary needs a switch to tell it to start, otherwise it spawns one of its many daemons and then sits there doing nothing. 2) The ejabberdctl binary doesn't return accurate information most of the time, and thus the rc script fails to stop or start the daemon correctly. When it does work, there is always one daemon left running. This only vanishes with a kill -9. Afterthought: I had a look at the output of "ejabberdctl status"; it is returning a load of errors: {error_logger,{{2006,3,7},{10,47,11}},std_error,'File operation error: eacces. Target: ./user_sup.beam. Function: get_file. Process: code_server.'} {error_logger,{{2006,3,7},{10,47,11}},std_error,'File operation error: eacces. Target: ./supervisor_bridge.beam. Function: get_file. Process: code_server.'} (etc.) However, the server otherwise seems to be running fine. >How-To-Repeat: Attempt to operate ejabberd using installed rc script. >Fix: Patch below. --- ejabberd.diff begins here --- --- files/ejabberd.sh.in.orig Sat Jan 7 06:29:54 2006 +++ files/ejabberd.sh.in Tue Mar 7 10:25:02 2006 @@ -43,12 +43,7 @@ ejabberd_start() { echo -n "Starting $name: " - if ejabberd_status; then - echo " already running." - exit 1 - else - su $EJABBERDUSER -c "$EJABBERD -noshell -detached" - fi + su $EJABBERDUSER -c "$EJABBERD -s -noshell -detached" echo "$name." } @@ -59,8 +54,8 @@ cnt=0 while ejabberd_status; do cnt=`expr $cnt + 1` - if [ $cnt -gt 60 ]; then - echo -n " failed " + if [ $cnt -gt 6 ]; then + killall -u ejabberd -kill break fi sleep 1 --- ejabberd.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: