Date: 20 Jan 2006 12:02:56 -0000 From: Lapo Luchini <lapo@lapo.it> To: FreeBSD-gnats-submit@FreeBSD.org Cc: ale@FreeBSD.org, garga@FreeBSD.org Subject: ports/92054: ports/net-im/jabber-py(icq|msn) rc.d files misbehave Message-ID: <20060120120256.45265.qmail@mail.lapo.it> Resent-Message-ID: <200601201210.k0KCAEVu004120@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 92054 >Category: ports >Synopsis: ports/net-im/jabber-py(icq|msn) rc.d files misbehave >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jan 20 12:10:14 GMT 2006 >Closed-Date: >Last-Modified: >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: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060120120256.45265.qmail>