From nobody@FreeBSD.org  Mon Feb 12 17:07:14 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 6B69916A401
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 Feb 2007 17:07:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 5C00A13C4A3
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 Feb 2007 17:07:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l1CH7Esq074735
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 Feb 2007 17:07:14 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l1CH7Dl5074734;
	Mon, 12 Feb 2007 17:07:13 GMT
	(envelope-from nobody)
Message-Id: <200702121707.l1CH7Dl5074734@www.freebsd.org>
Date: Mon, 12 Feb 2007 17:07:13 GMT
From: Volker Werth<volker@vwsoft.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] mpd4 rc-script bug
X-Send-Pr-Version: www-3.0

>Number:         109096
>Category:       ports
>Synopsis:       [PATCH] mpd4 rc-script bug
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    alepulver
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 12 17:10:23 GMT 2007
>Closed-Date:    Sat Feb 17 04:51:04 GMT 2007
>Last-Modified:  Sat Feb 17 04:51:04 GMT 2007
>Originator:     Volker Werth
>Release:        RELENG_6
>Organization:
>Environment:
FreeBSD cesar.sz.vwsoft.com 6.2-STABLE FreeBSD 6.2-STABLE #66: Sat Feb 10 23:47:51 CET 2007     root@cesar.sz.vwsoft.com:/usr/obj/usr/src/sys/CESAR  i386

>Description:
latest mpd4 (4.1) installs a bugged rc script.

When using mpd_flags in /etc/rc.conf starting up mpd4 fails with:
Starting mpd4.
Usage: mpd [options] [system]
Options:
  -b, --background                      Run as a background daemon
  -d, --directory config-dir            Set config file directory
  -k, --kill                            Kill running mpd process before start
  -f, --file config-file                Set configuration file
  -p, --pidfile filename                Set PID filename
  -s, --syslog-ident ident              Identifier to use for syslog
  -v, --version                         Show version information
  -h, --help                            Show usage information

as the parameter -p ${pidfile} is being set wrong in the rc-script.

Please see attached patch.
>How-To-Repeat:
use mpd_flags="anything-goes-to-mpd4" in /etc/rc.conf
start /usr/local/etc/rc.d/mpd4
>Fix:
--- mpd4        Mon Feb 12 18:02:12 2007
+++ mpd4.changed        Mon Feb 12 17:58:43 2007
@@ -38,7 +38,7 @@
         exit 1
         ;;
 *)
-        command_args="${mpd_flags} -p ${pidfile}"
+        command_args="-p ${pidfile} ${mpd_flags}"
         ;;
 esac
 

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Mon Feb 12 20:43:11 UTC 2007 
State-Changed-Why:  
Awaiting maintainers feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=109096 

From: Alexander Motin <mav@alkar.net>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/109096: [PATCH] net/mpd4 rc-script bug
Date: Mon, 12 Feb 2007 23:29:43 +0200

 This happens when "system" parameter is specified in mpd_flags.
 
 I agree with this patch.
 
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Tue Feb 13 01:13:31 UTC 2007 
State-Changed-Why:  
Maintainer approved. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=109096 
Responsible-Changed-From-To: freebsd-ports-bugs->alepulver 
Responsible-Changed-By: alepulver 
Responsible-Changed-When: Sat Feb 17 04:22:45 UTC 2007 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=109096 
State-Changed-From-To: open->closed 
State-Changed-By: alepulver 
State-Changed-When: Sat Feb 17 04:51:00 UTC 2007 
State-Changed-Why:  
Committed. Thanks! 

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