Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Aug 2012 15:38:51 -1000
From:      Doug Barton <dougb@FreeBSD.org>
To:        Steve Wills <swills@FreeBSD.org>
Cc:        ruby@FreeBSD.org, freebsd-rc@FreeBSD.org
Subject:   Re: procname when ruby is used
Message-ID:  <503EC42B.6000302@FreeBSD.org>
In-Reply-To: <503E6D62.3000101@FreeBSD.org>
References:  <503E6D62.3000101@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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