checking status of all scripts ?
Bruce Edge
bedge at troikanetworks.com
Fri Jan 10 17:58:57 CET 2003
> -----Original Message-----
> From: Frédéric BOITEUX [mailto:fboiteux at prosodie.com]
> Sent: Friday, January 10, 2003 1:50 AM
> To: Liste de diffusion des utilisateurs de FAI
> Subject: checking status of all scripts ?
>
>
> Hello,
>
> I've planned and prepared an installation procedure with
> the FAI tool,
> and during its customization, I've some problems checking
> that all scripts run fine :
> indeed, the status of scripts run aren't checked by the FAI
> task scripts,
> so I have to check all their logs to know if all is ok.
> Is there a better way to do this ? I think it should be
> nice to have a final report
> of all scripts run with their final status (I use the 'set
> -ex' bash command in each one)...
> Or can I submit some patch ?
>
> Regards,
>
> Fred.
> --
> Frédéric Boiteux - Calistel
>
I use a hook, hooks/faiend that greps the logs and filters out expected stuff and displays a completion status dialog if there was anything of note:
------------------------------
#! /bin/bash
errfile=/tmp/target/err.log
# Things to look for...
# Followed by things to ignore
grep -i \
-e "error" \
-e "fail" \
-e "warn" \
-e "no space" \
-e "syntax" \
-e "not found" \
-e "couldn't" \
-e "can't" \
-e "E: Sorry, broken packages" \
-e "operator expected" \
-e "ambiguous redirect" \
-e "No previous regular expression" \
-e "No such" \
-e "unknown option" \
-e "[a-z]\+\.log:E: " \
-e "cannot create" \
/tmp/fai/* \
| grep -vi \
-e "[a-z]\+\.log:#" \
-e "warned about = ( )" \
-e "daemon.warn" \
-e "kern.warn" \
-e "rw,errors=" \
-e "Expect some cache" \
-e "no error" \
-e "failmsg" \
-e "RPC call returned error 101" \
-e "deverror.out" \
-e "(floppy), sector 0" \
-e "mount version older than kernel" \
-e "Can't locate module " \
-e "Warning only 896MB will be used." \
-e "hostname: Host name lookup failure" \
-e "I can't tell the difference." \
-e "warning, not much extra random data, consider using the -rand option" \
-e "confC._FILE" \
-e "Warning: 3 database(s) sources" \
-e "were not found, (but were created)" \
-e "removing exim" \
-e "The home dir you specified already exists." \
-e "No Rule for /usr/lib/ispell/default.hash." \
-e "/usr/sbin/update-fonts-.\+: warning: absolute path" \
-e "hostname: Unknown server error" \
-e "EXT2-fs warning: checktime reached" \
-e "RPC: sendmsg returned error 101" \
-e "can't print them to stdout. Define these classes" \
-e "warning: downgrading" \
-e "suppress emacs errors" \
-e "echo Error: " \
-e "if you have both a SCSI and an IDE CD-ROM" \
-e "not updating .\+ font directory data." \
| sed -e "s,/tmp/fai/,," \
> $errfile
if [ -s $errfile ] ; then
dialog --title "Install errors detected" --textbox $errfile \
20 78 1>/dev/console
fi
rm $errfile
clear
------------------------------
I can also ssh into a target while it's installing and run this to check on the status so far.
-Bruce
More information about the linux-fai
mailing list