> > 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
> > *
> 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
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
> 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
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
> > 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
> 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
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
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
> 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
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
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
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
> 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
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
> 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
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]
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
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
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).
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
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
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
23 matches
Mail list logo