Re: [Leaf-user] ping check not working bug resolution

2002-01-07 Thread Charles Steinkuehler
> > As I indicated previously, /etc/profile is where your users' environment > > variable $HOSTNAME originates during the login process. It is only > > coincidental that Charles used $HOSTNAME in network.conf. Notice, > > multicron-* never sources /etc/network.conf, which means that it has > > *

Re: [Leaf-user] ping check not working bug resolution

2002-01-07 Thread Charles Steinkuehler
> It's funny that $HOME shows as /root but whoami doesn't return "root". > Also, all of the lrp.conf environment variables appear to be visible but not > the ones from network.conf (where $HOSTNAME is defined). Set ran from the > command line as root returns: Actually, the network.conf definitio

RE: [Leaf-user] ping check not working bug resolution

2002-01-06 Thread Jeff Newmiller
On Sat, 5 Jan 2002, Paul Rimmer wrote: > > As I indicated previously, /etc/profile is where your users' environment > > variable $HOSTNAME originates during the login process. It is only > > coincidental that Charles used $HOSTNAME in network.conf. Notice, > > multicron-* never sources /etc/net

RE: [Leaf-user] ping check not working bug resolution

2002-01-05 Thread Paul Rimmer
> As I indicated previously, /etc/profile is where your users' environment > variable $HOSTNAME originates during the login process. It is only > coincidental that Charles used $HOSTNAME in network.conf. Notice, > multicron-* never sources /etc/network.conf, which means that it has > *no* idea w

Re: [Leaf-user] ping check not working bug resolution

2002-01-05 Thread Michael D. Schleif
Paul Rimmer wrote: > [ snip ] > It's funny that $HOME shows as /root but whoami doesn't return "root". > Also, all of the lrp.conf environment variables appear to be visible but not > the ones from network.conf (where $HOSTNAME is defined). [ snip ] As I indicated previously, /etc/profile is

RE: [Leaf-user] ping check not working bug resolution

2002-01-05 Thread Paul Rimmer
> > Is there a command equivalent to "env" to check all > > available environment variables? > > env may be available as part of recent busybox versions; I know there > was a patch for it. Also, ash should give you a report with the 'set' > command: > > # set > > Hope this helps! Thanks for the

RE: [Leaf-user] ping check not working bug resolution

2002-01-05 Thread Paul Rimmer
> You can try to figure it out or just code the > thing to work, like this: > > LEAFHOSTNAME=`cat /etc/hostname` I've gone back to just using $(hostname) vs $HOSTNAME. Works OK, just have to replace the few occurences in multicron-p. > and just use that. If you want to figure > it out, write a

RE: [Leaf-user] ping check not working bug resolution

2002-01-04 Thread David Douthitt
On 1/3/02 at 8:07 PM, Paul Rimmer <[EMAIL PROTECTED]> wrote: > Is there a command equivalent to "env" to check all > available environment variables? env may be available as part of recent busybox versions; I know there was a patch for it. Also, ash should give you a report with the 'set' comma

Re: [Leaf-user] ping check not working bug resolution

2002-01-04 Thread Matt Schalit
Paul Rimmer wrote: > > Whoops, added missing /bin to path and now email comes through but $HOSTNAME > still returns nothing. You can try to figure it out or just code the thing to work, like this: LEAFHOSTNAME=`cat /etc/hostname` and just use that. If you want to figure it out, write a few te

RE: [Leaf-user] ping check not working bug resolution

2002-01-04 Thread Robert Williams
> Is there a command equivalent to "env" to check all available >environment variables? > Hi, The command printenv will give you a list of the current environment variables. To see what environment the shell running multicron-p has add the line echo `printenv` >> /etc/env.out to the multicron

RE: [Leaf-user] ping check not working bug resolution

2002-01-04 Thread Jeff Newmiller
On Fri, 4 Jan 2002, Paul Rimmer wrote: [...] > #Test Line follows > PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/usr/bin > > main () { > > prog=`basename $0` > > > The mailing no longer occurs. Remove it and I get the emails again but with > no $HOSTNAME. Just so I know, what is th

RE: [Leaf-user] ping check not working bug resolution

2002-01-04 Thread Paul Rimmer
Whoops, added missing /bin to path and now email comes through but $HOSTNAME still returns nothing. > > 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

Re: [Leaf-user] ping check not working bug resolution

2002-01-04 Thread Michael D. Schleif
Paul Rimmer wrote: > > > Add this to /etc/multicron-p: > > > > environment () { > > { > > echo > > echo "$(set)" > > } | mailadmin "Environment List" > > } > > > > Then, make sure that periodic contains the new function: > > > > periodic () { > > env

RE: [Leaf-user] ping check not working bug resolution

2002-01-04 Thread Paul Rimmer
> 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

Re: [Leaf-user] ping check not working bug resolution

2002-01-03 Thread Michael D. Schleif
Paul Rimmer wrote: > > > Clearly, $HOSTNAME is *not* in the environment for whatever user is > > executing your cron job. > > cron is a root process (I assume this means multicron-p will be executed as > root?) and I am logged in as root when I successfully use the $HOSTNAME > global from the c

RE: [Leaf-user] ping check not working bug resolution

2002-01-03 Thread Paul Rimmer
> Clearly, $HOSTNAME is *not* in the environment for whatever user is > executing your cron job. cron is a root process (I assume this means multicron-p will be executed as root?) and I am logged in as root when I successfully use the $HOSTNAME global from the command line. If I can succesfully

Re: [Leaf-user] ping check not working bug resolution

2002-01-03 Thread Michael D. Schleif
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]

RE: [Leaf-user] ping check not working bug resolution

2002-01-03 Thread Paul Rimmer
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] Hi Paul, > This is working on my end

RE: [Leaf-user] ping check not working bug resolution

2002-01-03 Thread Robert Williams
Hi Paul, This is working on my end but here are a couple of things to check. The $HOSTNAME variable is exported from /etc/profile so it should be accessible to the shell running multicron-p. export HOSTNAME="$(hostname)" Check to see what the output of the command hostname is. If it is empty

RE: [Leaf-user] ping check not working bug resolution

2002-01-03 Thread Paul Rimmer
Great find Robert. Now that my pingcheck is working with your fix I notice that the script does not fill in the src field. Here's what I get in the "alert: Ping Failure!" email: host: shaw.ca date: Thu Jan 3 14:50:51 MST 2002 src : "src : $HOSTNAME" is the culprit /etc/multicron-d, line 132).

Re: [Leaf-user] ping check not working bug resolution

2001-12-30 Thread Robert Williams
Hi all, On further investigation I found that the PATH of the multicron-p@ process was /usr/bin:/bin. By redirecting std error of the mail command I found that it was not finding the mail command. # m ermsg /etc/multicron-p: mail: command not found I then hard coded the mail command

Re: [Leaf-user] ping check not working

2001-12-30 Thread David Douthitt
On 12/29/01 at 9:47 PM, Robert Williams <[EMAIL PROTECTED]> wrote: > I am using Dachstien 1.0.2 cd and I am having trouble with > the ping check function. If I run multicron-p from the > command line the ping check works and since the address is > bogus (for testing) it sends me an email. > Any

[Leaf-user] ping check not working

2001-12-29 Thread Robert Williams
Hi all, I am using Dachstien 1.0.2 cd and I am having trouble with the ping check function. If I run multicron-p from the command line the ping check works and since the address is bogus (for testing) it sends me an email. # List of hosts to ping check. ADMIN will be sent mail if any fail. l