From owner-freebsd-ruby@FreeBSD.ORG Thu Aug 30 01:38:54 2012 Return-Path: Delivered-To: ruby@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id E9A16106564A; Thu, 30 Aug 2012 01:38:54 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 681D214D802; Thu, 30 Aug 2012 01:38:52 +0000 (UTC) Message-ID: <503EC42B.6000302@FreeBSD.org> Date: Wed, 29 Aug 2012 15:38:51 -1000 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: Steve Wills References: <503E6D62.3000101@FreeBSD.org> In-Reply-To: <503E6D62.3000101@FreeBSD.org> X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: ruby@FreeBSD.org, freebsd-rc@FreeBSD.org Subject: Re: procname when ruby is used X-BeenThere: freebsd-ruby@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD-specific Ruby discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 01:38:55 -0000 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