Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jan 2010 12:10:23 +0400
From:      rihad <rihad@mail.ru>
To:        freebsd-ports@freebsd.org
Subject:   Setting LD_PRELOAD for a port
Message-ID:  <4B5D51EF.9090609@mail.ru>

next in thread | raw e-mail | index | archive | help
Hi,

How does one cleanly set a LD_PRELOAD environment variable for a port?
I tried it in /etc/rc.conf:
radiusd_program="/usr/bin/env 
LD_PRELOAD=/usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so 
/usr/local/sbin/radiusd"

(FreeRADIUS 2.1.6 with rlm_perl otherwise fails to start under perl 
5.8.8 due to some unresolved dependency. (And I can't use Perl 5.8.9 
because rlm_perl then just segfaults.) Older FreeRADIUS 2.1.3 w/ Perl 
5.8.8 works fine without requiring any LD_* workarounds though.)

but then

# /usr/local/etc/rc.d/radiusd start
/usr/local/etc/rc.d/radiusd: WARNING: no shebang line in /usr/bin/env
[: /usr/bin/env: unexpected operator
Starting radiusd
#
The daemon does start, but I can't "stop" it later, and "status" shows 
that it isn't running.

So I only have to hardcode it in /usr/local/etc/rc.d/radiusd?


Thanks.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B5D51EF.9090609>