Paul Rimmer wrote:
>
> Robert, thanks for the help.
>
> "/bin/hostname" reports the correct value when run from the command line.
> The parameter is correctly configured automatically by network.conf. The
> hostname file also exists in /etc.
>
> If I run "mail -s $HOSTNAME [EMAIL PROTECTED] </var/log/syslog" from the
> command line I get an email with the correct hostname in the subject field.
>
> However multicron-p still emails me a blank src?? This is with Dachstein CD
> v1.01 booting from a floppy and then CD. A pretty plain Jane config,
> nothing fancy. Everything is being run as root (except dnscache) so nothing
> funky with users.
>
> OK, my workaround is to change the line to:"src : $(hostname)". That seems
> to work now. No idea why default $HOSTNAME doesn't?
Clearly, $HOSTNAME is *not* in the environment for whatever user is
executing your cron job.
Does /etc/profile contain this line?
export HOSTNAME="$(hostname)"
At anyrate, this is how $HOSTNAME gets it value under DCD. I vaguely
remember having problems with multicron-p and one of my working changes
is to include this line immediately prior to the call to main():
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
Nevertheless, there is nothing wrong with your use of $(hostname), since
that is the call used to set HOSTNAME to begin with . . .
--
Best Regards,
mds
mds resource
888.250.3987
Dare to fix things before they break . . .
Our capacity for understanding is inversely proportional to how much we
think we know. The more I know, the more I know I don't know . . .
_______________________________________________
Leaf-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user