Bug 248993

Summary: net/mpd5: rc script fails when alternate config location specified in flags.
Product: Ports & Packages Reporter: mickey242
Component: Individual Port(s)Assignee: Eugene Grosbein <eugen>
Status: Closed FIXED    
Severity: Affects Only Me Flags: eugen: maintainer-feedback+
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description mickey242 2020-08-29 19:03:10 UTC
The rc script installed by net/mpd5 (/usr/local/etc/rc.d/mpd5) fails to start the service in the scenario where the mpd_flags variable in /etc/rc.conf specifies an alternate location for the configuration directory or -file by using the -d/--directory or -f/--file options and the file /usr/local/etc/mpd5/mpd.conf does not exist. This is caused by the following line that disregards anything that might be specified in the mpd_flags variable:

required_files="/usr/local/etc/${name}/mpd.conf"
Comment 1 commit-hook freebsd_committer freebsd_triage 2020-08-29 20:16:09 UTC
A commit references this bug:

Author: eugen
Date: Sat Aug 29 20:15:41 UTC 2020
New revision: 546946
URL: https://svnweb.freebsd.org/changeset/ports/546946

Log:
  net/mpd5: remove required_files from startup script

  Name and/or location of the configuration file may be changed
  with mpd_flags, in which case required_files prevents starting service.

  It is no big deal if mpd5 started with missing configuration file
  because it just prints a warning to the log and exits in that case.

  PR:		248993

Changes:
  head/net/mpd5/Makefile
  head/net/mpd5/files/mpd5.in
Comment 2 Eugene Grosbein freebsd_committer freebsd_triage 2020-08-29 20:17:14 UTC
Fixed with r546946. Thank you for the report!