From owner-freebsd-rc@FreeBSD.ORG Wed Aug 29 19:39:41 2012 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 06665106564A; Wed, 29 Aug 2012 19:39:41 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from mouf.net (mouf.net [IPv6:2607:fc50:0:4400:216:3eff:fe69:33b3]) by mx1.freebsd.org (Postfix) with ESMTP id B50158FC12; Wed, 29 Aug 2012 19:39:40 +0000 (UTC) Received: from meatwad.mouf.net (cpe-024-162-230-236.nc.res.rr.com [24.162.230.236]) (authenticated bits=0) by mouf.net (8.14.5/8.14.5) with ESMTP id q7TJc6Cf002369 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NOT); Wed, 29 Aug 2012 15:38:07 -0400 (EDT) (envelope-from swills@FreeBSD.org) Message-ID: <503E6FF8.60706@FreeBSD.org> Date: Wed, 29 Aug 2012 15:39:36 -0400 From: Steve Wills User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120604 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-rc@FreeBSD.org References: <503E6D62.3000101@FreeBSD.org> In-Reply-To: <503E6D62.3000101@FreeBSD.org> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mouf.net [199.48.129.64]); Wed, 29 Aug 2012 15:38:07 -0400 (EDT) X-Spam-Status: No, score=0.0 required=4.5 tests=none autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mouf.net X-Virus-Scanned: clamav-milter 0.97.5 at mouf.net X-Virus-Status: Clean Cc: ruby@FreeBSD.org Subject: Re: procname when ruby is used X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 19:39:41 -0000 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