[Logcheck-devel] Update for Solaris 8/9 logcheck.sh
Gordon Thagard
gordon at eng.fsu.edu
Fri Aug 6 16:44:20 UTC 2004
Hello,
it seems that Solaris 8 and 9 don't provide a proper /usr/bin/mail
command. The silly thing doesn't support the "-s" option so the
logcheck.sh fails with a "mail: Null names are not allowed" whenever I
tried to run it. After reading the manpage for mail I realized the
problem. This led me to rewriting the script and I was hoping you might
add my changes to the src/logcheck-1.1.1/systems/sun/logcheck.sh script.
Below is the result of my very minor improvement:
-------------------------- cut here -----------------------------
# If there are results, mail them to sysadmin
if [ "$ATTACK" -eq 1 ]; then
echo "Subject: $HOSTNAME $DATE ACTIVE SYSTEM ATTACK!" >
$TMPDIR/check.tmp
cat $TMPDIR/checkreport.$$ >> $TMPDIR/check.tmp
cat $TMPDIR/check.tmp | $MAIL $SYSADMIN
elif [ "$FOUND" -eq 1 ]; then
echo "Subject: $HOSTNAME $DATE system check" > $TMPDIR/check.tmp
cat $TMPDIR/checkreport.$$ >> $TMPDIR/check.tmp
cat $TMPDIR/check.tmp | $MAIL $SYSADMIN
fi
# Clean Up
rm -f $TMPDIR/check.$$ $TMPDIR/checkoutput.$$ $TMPDIR/checkreport.$$
$TMPDIR/check.tmp
-------------------------- cut here -----------------------------
I hope your will accept my little contribution to the project. Thanks
for your time.
Cheers,
--
Gordon Thagard, UNIX Systems Administrator
FAMU-FSU College of Engineering
Communications & Multimedia Services
2525 Pottsdammer Street Suite A-332L
Tallahassee, FL 32310-6046
V: (850) 410-6449
F: (850) 410-6484
M: (850) 443-4220
More information about the Logcheck-devel
mailing list