Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Feb 2007 17:07:13 GMT
From:      Volker Werth<volker@vwsoft.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/109096: [PATCH] mpd4 rc-script bug
Message-ID:  <200702121707.l1CH7Dl5074734@www.freebsd.org>
Resent-Message-ID: <200702121710.l1CHANKF028959@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         109096
>Category:       ports
>Synopsis:       [PATCH] mpd4 rc-script bug
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 12 17:10:23 GMT 2007
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702121707.l1CH7Dl5074734>