procname when ruby is used

Doug Barton dougb at FreeBSD.org
Thu Aug 30 01:38:55 UTC 2012


On 08/29/2012 09:28 AM, Steve Wills wrote:
> Hi,
> 
> I've encountered a situation with an rc script that I'm not sure how to
> solve. The issue is summarized well in this PR:
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/170980
> 
> Basically, the "ruby" that's in use can vary because ruby 1.8 or ruby
> 1.9 may be used. There may be "ruby", "ruby18" or "ruby19" or perhaps
> other things. There is a function in the bsd.ruby.mk that replaces the
> shebang lines of ruby scripts, causing the issue in the PR (which I've
> verified). I'm not sure how I can change the rc script to accommodate
> the variance. Any suggestions?

I'm pretty sure you actually want to use command_interpreter instead of
procname. It should actually be very rare to use procname directly in an
rc.d script.

That said, I understand the problem you are dealing with, and I agree
that we don't have a clean solution for it. I dealt with something
similar in net-mgmt/hawk, you might want to take a look at that.
Basically I brute-forced the shebang line in the installed script and
the value of command_interpreter in the rc.d script to both match
${PERL}. Not sure if that exact solution will work for you, but
hopefully it gives you some ideas.

Doug



More information about the freebsd-ruby mailing list