Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Aug 2012 15:39:36 -0400
From:      Steve Wills <swills@FreeBSD.org>
To:        freebsd-rc@FreeBSD.org
Cc:        ruby@FreeBSD.org
Subject:   Re: procname when ruby is used
Message-ID:  <503E6FF8.60706@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/12 15:28, 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?
> 

Naturally I come up with a workaround just after sending...

name="mcollectived"
command="%%PREFIX%%/sbin/${name}"
procname="%%PREFIX%%/bin/`head -n1 ${command} | sed -e 's,.*/,,'`"

rc people, is this too ugly? :)

Thanks,
Steve




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