[CentOS] $HOME variable not set from init script

Mon Oct 23 17:33:50 UTC 2006
Oliver Schulze L. <oliver at samera.com.py>

Hi,
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

I checked the /etc/init.d/mimedefang file and the chain of commands
seems to be this:

/etc/init.d/mimedefang -> daemon function from /etc/init.d/function ->
/sbin/runuser

SpamAssassin perl module is called from the mimedefang perl program.

I'm thinking that /sbin/runuser is the root cause of the problem.

My questions are:
- does /sbin/runuser set the $HOME at boot time?
- should /sbin/runuser be called with the -l option?

Thanks
Oliver

-- 
Oliver Schulze L.
Get my e-mail after a captcha test in: http://tinymailto.com/oliver