[BRAINSTORM] shebang fixing framework
Jeremy Messenger
mezz.freebsd at gmail.com
Thu May 2 20:00:19 UTC 2013
On Thu, May 2, 2013 at 2:51 PM, Łukasz Wąsikowski <lukasz at wasikowski.net> wrote:
> W dniu 2013-05-02 20:29, Oliver Heesakkers pisze:
>
>> Op do 02 mei 2013 16:22:41 schreef Łukasz Wąsikowski:
>
>>> /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.
>>
>>
>> A question that arises from reading that pr is why service doesn't include
>> /usr/local/bin and /usr/local/sbin in its PATH, if it does your problem would
>> probably dissapear.
>
> That would probably be the best fix.
>
>> I have no /usr/bin/perl symlink, in the pure-ftpd port directory I do:
>>
>> make extract
>> head -n1 work/pure-ftpd-1.0.36/configuration-file/pure-config.pl.in
>> #! @PERL@
>>
>>
>> After installation the shebang reads:
>> #! /usr/local/bin/perl
>>
>> and I can use service to start or stop the daemon without any hacking.
>
> That is interesting. service(8) clearly states that PATH is set to
> /sbin:/bin:/usr/sbin:/usr/bin, so perl interpreter in /usr/local/bin
> should not work (like it doesn't in my case).
The gdm's RC script has to set (export) PATH to make everything work.
> --
> best regards,
> Lukasz Wasikowski
--
mezz.freebsd at gmail.com - mezz at FreeBSD.org
FreeBSD GNOME Team
http://www.FreeBSD.org/gnome/ - gnome at FreeBSD.org
More information about the freebsd-ports
mailing list