mpd does not report its pid/pidfile, while it offers a --kill option. But this option only sends the signal, which makes the `rc.d/musicpd restart` always fails (well... may not be always). Fix: I wrote a function to use kevent to wait for the pid. I just make it FreeBSD-specific since I don't want to spend time on autotools. The idea is borrowed from src/bin/pwait.c
Maintainer of audio/musicpd, Please note that PR ports/157173 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/157173 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Thanks for this. However, I think that I'll rewrite the stop part of the rc script -- that'd be much more standard than using the kill option. I'll get on that tonight. I'll pass your work upstream though! Chris
OK, patch attached: I've taken advice from freebsd-rc and used the get_pidfile_from_conf function, with a default of whatever is default in %%MPDCONF%%. I've also removed the $FreeBSD$ line from musicpd.in -- it's no longer necessary or desirable according to dougb. Many thanks to dougb@ for the advice. - Fix stop function in rc script PR: ports/157173 Noticed by: Zhihao Yuan <lichray@gmail.com> Chris
Er, perhaps bump PORTREVISION too. - Fix stop function in rc script PR: ports/157173 Noticed by: Zhihao Yuan <lichray@gmail.com>
State Changed From-To: feedback->open Maintainer has responded with updated patch.
On 05/21/2011 00:43, Chris Rees wrote: > OK, patch attached: > > I've taken advice from freebsd-rc and used the get_pidfile_from_conf > function, with a default of whatever is default in %%MPDCONF%%. I've > also removed the $FreeBSD$ line from musicpd.in -- it's no longer > necessary or desirable according to dougb. Umm, I never said that. :) In fact I've said the opposite. What you may be thinking of is my dislike for default-empty variable assignments. I took a look at the script and the patch looks fine. I made one micro-optimization in the attached patch. Since there is no user-variable for the conf file there is no point in having it as a variable in the script. > Many thanks to dougb@ for the advice. My pleasure. :) Doug > - Fix stop function in rc script > > PR: ports/157173 > Noticed by: Zhihao Yuan<lichray@gmail.com> > > Chris -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/
On 21 May 2011 19:17, Doug Barton <dougb@freebsd.org> wrote: > On 05/21/2011 00:43, Chris Rees wrote: >> >> OK, patch attached: >> >> I've taken advice from freebsd-rc and used the get_pidfile_from_conf >> function, with a default of whatever is default in %%MPDCONF%%. I've >> also removed the $FreeBSD$ line from musicpd.in -- it's no longer >> necessary or desirable according to dougb. > > Umm, I never said that. :) =A0In fact I've said the opposite. What you ma= y be > thinking of is my dislike for default-empty variable assignments. > Thanks for the fixes... I was originally thinking of your email to me on monitorix: 1. The FreeBSD KEYWORD is no longer necessary or desirable. I now realise that you were talking about the KEYWORD: part of rcorder.... = d'oh! Chris
On 05/21/2011 12:15, Chris Rees wrote: > On 21 May 2011 19:17, Doug Barton<dougb@freebsd.org> wrote: >> On 05/21/2011 00:43, Chris Rees wrote: >>> >>> OK, patch attached: >>> >>> I've taken advice from freebsd-rc and used the get_pidfile_from_conf >>> function, with a default of whatever is default in %%MPDCONF%%. I've >>> also removed the $FreeBSD$ line from musicpd.in -- it's no longer >>> necessary or desirable according to dougb. >> >> Umm, I never said that. :) In fact I've said the opposite. What you may be >> thinking of is my dislike for default-empty variable assignments. >> > > Thanks for the fixes... > > I was originally thinking of your email to me on monitorix: > > 1. The FreeBSD KEYWORD is no longer necessary or desirable. > > I now realise that you were talking about the KEYWORD: part of rcorder.... d'oh! Voila! -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/
Responsible Changed From-To: freebsd-ports-bugs->crees I'll take it
State Changed From-To: open->closed Committed, with minor changes. Thanks!
crees 2011-06-17 13:59:53 UTC FreeBSD ports repository Modified files: audio/musicpd Makefile audio/musicpd/files musicpd.in Log: - Fix stop function in rc script PR: ports/157173 Submitted by: Zhihao Yuan <lichray@gmail.com> Reviewed by: dougb Approved by: tabthorpe (co-mentor) Revision Changes Path 1.65 +1 -1 ports/audio/musicpd/Makefile 1.8 +14 -11 ports/audio/musicpd/files/musicpd.in _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"