[CentOS] $HOME variable not set from init script
James Olin Oden
james.oden at gmail.com
Mon Oct 23 17:39:40 UTC 2006
On 10/23/06, Oliver Schulze L. <oliver at samera.com.py> wrote:
> I'm using Centos 4.4 with: mimedefang.org + spamassassin.org
> Mimedefang(MD) is a perl program that calls SpamAssassin(SA) perl module.
> The problem I'm getting is that from update 4.4, SA does not seems
> to find the $HOME variable only when it is called during system boot.
> If you later login as root and run:
> $ service mimedefang restart
> then SA does indeed find the $HOME variable
HOME is defined by your shell. Its not specified that it should be
set by init, and it appears its isn't. I've never used mimedefang so
I don't know the context of its use of the HOME environment variable,
such that I could suggest a solution to your problem. I will say that
in the past I have made the script that is to be ran in that
environment give HOME a default of some sort so if/when it was ran out
of init it would still function properly (BTW, its likely you would
see this in cron too).
More information about the CentOS