check_log script errors
Daniel_Casey at jbhunt.com
Daniel_Casey at jbhunt.com
Thu Jan 30 23:13:32 CET 2003
Nagios 1.0 on AIX 4.3.3
Around line 186 in the check_log plugin script, there is a piece of code
that reads:
# The old log file exists, so compare it to the original log now
# The temporary file that the script should use while
# processing the log file.
if [ -x mktemp-x /usr/local/bin/mktemp
tempdiff=`mktemp`
else
tempdiff=`/bin/date '+%H%M%S'`
tempdiff="/tmp/check_log.${tempdiff}"
/bin/touch $tempdiff
chmod 600 $tempdiff
fi
Can't figure what the first if statement should be. My guess is that it's
checking to see
if the /usr/local/bin/mktemp is executable (-x) and if so, then run assign
mktemp to the
tempdiff variable, else, tempdiff get a different assignment. So possibly:
if [ -x /usr/local/bin/mktemp ]; then
.
.
However, when I run the script manually, I get an error about diff:
diff: 0653-802 Specify two file names.
Has anyone done any work to this script? I'll see if I can get it working
and post the
results to the list, but would appreciate any help.
Thanks.
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
More information about the Users
mailing list