Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 May 2013 16:51:21 -0400
From:      Garance A Drosehn <gad@FreeBSD.org>
To:        =?UTF-8?B?xYF1a2FzeiBXxIVzaWtvd3NraQ==?= <lukasz@wasikowski.net>
Cc:        Oliver Heesakkers <freebsd@heesakkers.info>, freebsd-ports@freebsd.org
Subject:   Re: [BRAINSTORM] shebang fixing framework
Message-ID:  <5182D1C9.7050401@FreeBSD.org>
In-Reply-To: <518276B1.80000@wasikowski.net>
References:  <20130430103821.GJ3577@ithaqua.etoilebsd.net> <1786370.b1sXK5t6Pv@pcoliver.heesakkers.info> <518276B1.80000@wasikowski.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 5/2/13 10:22 AM, Łukasz Wąsikowski wrote:
> W dniu 2013-05-01 21:18, Oliver Heesakkers pisze:
>
>> Op di 30 apr 2013 12:38:21 schreef Baptiste Daroussin:
>
>>
>> In there you wrote a patch using /usr/bin/env. Why not stick with that? I'm
>> quite fond of this technique as it's clean and portable.
>>
>> Portability might not be that important when working on a fix for ports alone,
>> but still makes sense to me.
>
> /usr/bin/env is not good in all the situation. Look at
> www.freebsd.org/cgi/query-pr.cgi?pr=177481 - /usr/bin/env is not working
> when using 'service' to start daemons. We should change PATH used by
> 'service' to include /usr/local/bin and /usr/local/sbin or stop using
> /usr/bin/env to start rc.d scripts.

I'm in the middle of our (RPI) end-of-semester crunch, so I haven't had
the time to review all of this and make sure I understand what the
issues are.

However, I will note that FreeBSD's 'env' command includes an option
for setting the path's to search.  It also includes the '-S' option,
which is important for getting the '-P' option to work correctly
when used on a shebang line.

These are FreeBSD-specific extensions, so they wouldn't help if you
want to write portable code.  But I think they should help for some
of the issues which people have described in this thread.


-- 
Garance Alistair Drosehn            =   gad@gilead.netel.rpi.edu
Senior Systems Programmer           or  gad@freebsd.org
Rensselaer Polytechnic Institute    or  drosih@rpi.edu



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5182D1C9.7050401>