> Add this to /etc/multicron-p:
>
> environment () {
>       {
>               echo
>               echo "$(set)"
>       } | mailadmin "Environment List"
> }
>
> Then, make sure that periodic contains the new function:
>
> periodic () {
>       environment
>       checkfreespace
>       pingcheck
> }
>
> Now, wait for cron to act on this -- fortunately, with multicron-p, you
> won't have to wait long ;>

OK, I get the env variables with no mention of $HOSTNAME.  I also added a
printout of "$(whoami)" to see what user the process was running under but
it returned a blank string.

> Finally, try the same thing by adding this immediately prior to main():
>
> PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
>
> What do you think?

As soon as I add the path change:

<SNIP>
############################################################################
##
# Processing Core   It is recommended you don't add functions directly
# to his file. Keep them external and source them.
############################################################################
##

#Test Line follows
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/usr/bin

main () {

prog=`basename $0`
<SNIP>

The mailing no longer occurs.  Remove it and I get the emails again but with
no $HOSTNAME.  Just so I know, what is the relationship between PATH and
environment variables?  How does adding the above path provide visibility to
$HOSTNAME?

Thanks,
Paul


_______________________________________________
Leaf-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user

Reply via email to