Subject: pkg/28600: update mu-conference rc.d startup script
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <eric@cirr.com>
List: pkgsrc-bugs
Date: 12/10/2004 07:00:01
>Number: 28600
>Category: pkg
>Synopsis: mu-conference's rc.d script doesn't get the user/pid-file right.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Dec 10 07:00:01 +0000 2004
>Originator: Eric Schnoebelen
>Release: NetBSD 2.0G
>Organization:
Central Iowa (Model) Railroad (cirr.com)
>Environment:
System: NetBSD thezew.cirr.com 2.0G NetBSD 2.0G (GENERIC) #9: Fri Aug 27 15:51:57 CDT 2004 eric@egsner.cirr.com:/work/eric/NetBSD-current/obj/alpha/sys/arch/alpha/compile/GENERIC alpha
Architecture: alpha
Machine: alpha
>Description:
chat/mu-conference's rc.d script doesn't change the user
identity to jabberd (running as root instead) and doesn't get
the path to the pid-file correct.
>How-To-Repeat:
install chat/mu-conference, and observe that when started, it
runs as root, and that the status command of PKG/etc/rc.d/muc
doesn't work.
>Fix:
Index: files/muc.sh
===================================================================
RCS file: /cvsroot/pkgsrc/chat/mu-conference/files/muc.sh,v
retrieving revision 1.2
diff -b -u -w -r1.2 muc.sh
--- files/muc.sh 8 Jul 2004 22:26:04 -0000 1.2
+++ files/muc.sh 10 Dec 2004 06:58:20 -0000
@@ -14,8 +14,9 @@
command="@PREFIX@/bin/mu-conference"
required_files="@PKG_SYSCONFDIR@/${name}-jcr.xml"
extra_commands="reload"
+muc_user="@JABBERD_USER@"
command_args="-c ${required_files} > /dev/null 2>&1 &"
-pidfile="@JABBERD_PIDDIR@/${name}.pid"
+pidfile="@JABBERD_PIDDIR@/`basename ${command}`.pid"
stop_postcmd="remove_pidfile"
start_precmd="ensure_piddir"