From lapo@mail.lapo.it  Fri Jan 20 12:03:11 2006
Return-Path: <lapo@mail.lapo.it>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A71D416A420
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 20 Jan 2006 12:03:11 +0000 (GMT)
	(envelope-from lapo@mail.lapo.it)
Received: from mail.lapo.it (static.88-198-0-105.clients.your-server.de [88.198.0.105])
	by mx1.FreeBSD.org (Postfix) with SMTP id 19C7C43D8E
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 20 Jan 2006 12:02:57 +0000 (GMT)
	(envelope-from lapo@mail.lapo.it)
Received: (qmail 45266 invoked by uid 1001); 20 Jan 2006 12:02:56 -0000
Message-Id: <20060120120256.45265.qmail@mail.lapo.it>
Date: 20 Jan 2006 12:02:56 -0000
From: Lapo Luchini <lapo@lapo.it>
Reply-To: Lapo Luchini <lapo@lapo.it>
To: FreeBSD-gnats-submit@freebsd.org
Cc: garga@FreeBSD.org, ale@FreeBSD.org
Subject: ports/net-im/jabber-py(icq|msn) rc.d files misbehave
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         92054
>Category:       ports
>Synopsis:       ports/net-im/jabber-py(icq|msn) rc.d files misbehave
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    garga
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 20 12:10:14 GMT 2006
>Closed-Date:    Mon Jan 23 10:48:09 GMT 2006
>Last-Modified:  Mon Jan 23 10:48:09 GMT 2006
>Originator:     Lapo Luchini
>Release:        FreeBSD 6.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD motoko.lapo.it 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Wed Nov 2 19:07:38 UTC 2005 root@rat.samsco.home:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:
The rc.d scripts distributed with
  ports/net-im/jabber-pyicq
and
  ports/net-im/jabber-pymsn
don't honor the variables put in rc.conf.

>How-To-Repeat:

Change some vars in rc.conf and "start" the service.

>Fix:

I did the following mods the rc.d files and found some probable errors:

Changed
  jabber_pyicq_dir=${jabberd_pyicq_dir-"/usr/local/lib/jabber/pyicq"}
to
  jabber_pyicq_dir=${jabber_pyicq_dir:-"/usr/local/lib/jabber/pyicq"}

Moved
  load_rc_config $name
higher in the file, else the command_ lines do not "see"
the rc.conf settings.

Added the missing -o option to
  command_args="-o pid=${pidfile} &"

Follows my full working pyicq script.
pymsn needed the same mods but also seems that xml file configuration
about the PID file overrides the one passed as -o, differently
from pyicq.

--- jabber-pyicq-transport.sh begins here ---
#!/bin/sh

# Start or stop jabber-pyicq
# $FreeBSD: ports/net-im/jabber-pyicq/files/jabber-pyicq-transport.sh.in,v 1.1 2005/06/07 15:18:15 pav Exp $

# PROVIDE: jabber_pyicq
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: FreeBSD shutdown
#
# Define these jabber_pyicq_* variables in one of these files:
#       /etc/rc.conf
#       /etc/rc.conf.local
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
jabber_pyicq_dir=${jabber_pyicq_dir:-"/usr/local/lib/jabber/pyicq"}
jabber_pyicq_piddir=${jabber_pyicq_piddir:-"/var/jabberd/pid"}
jabber_pyicq_enable=${jabber_pyicq_enable:-"NO"}

. /etc/rc.subr
name="jabber_pyicq"
rcvar=`set_rcvar`
load_rc_config $name

pidfile="${jabber_pyicq_piddir}/pyicq.pid"
command_interpreter="/usr/local/bin/python"
command="${jabber_pyicq_dir}/main.py"
command_args="-o pid=${pidfile} &"

run_rc_command "$1"
--- jabber-pyicq-transport.sh ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->garga 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Jan 20 12:13:54 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92054 
State-Changed-From-To: open->closed 
State-Changed-By: garga 
State-Changed-When: Mon Jan 23 10:48:07 UTC 2006 
State-Changed-Why:  
Committed. Please, send another PR with the patch to be applied in 
jabber-pymsn, i'm not the maintainer of this port and can't make the 
changes. Thanks for contributing! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92054 
>Unformatted:
