[Avcheck] AvpUpdate.pl and checking the downloaded files

Ralf Hildebrandt Ralf.Hildebrandt@charite.de
Wed, 23 Jan 2002 16:03:10 +0100


Today our kavdaemon died an ugly death, because one of the updated
files was corrupt / missing and kavdaemon was restarted.

My idea:

I created a directory /opt/AVP which contains:

-rw-r--r--    1 root     root          135 Jan 23 15:40 AvpUnix.ini
-rw-r--r--    1 root     root          950 Jan 23 15:44 AvpUnix.key
lrwxrwxrwx    1 root     root           20 Jan 23 15:38 bases -> /var/spool/avp/bases
lrwxrwxrwx    1 root     root           26 Jan 23 15:41 defUnix.prf -> /var/spool/avp/defUnix.prf
lrwxrwxrwx    1 root     root           25 Jan 23 15:41 kavscanner -> /var/spool/avp/kavscanner

Comments:
a) Linking the AvpUnix.key doesn't work -- bad code?
b) AvpUnix.ini needs to be changed, due to the fact that the real
   AvpUnix.ini works only for the chroot jail!

I thought if I started kavscanner like this:

% ./kavscanner -Y . && restart_kavdaemon || echo "Oh shit!"

it would load the bases (which it does) and would complain with a
non-zero exit status. 

Unfortunately kavscanner is a piece of junk -- If I delete one bases
file, I get: 

# ./kavscanner -Y . < /dev/null > /dev/null;echo $?
mount: /dev/fd0 is not a valid block device
mount: /dev/fd0 is not a valid block device
mount: /dev/fd0 is not a valid block device
mount: /dev/fd0 is not a valid block device
mount: /dev/fd0 is not a valid block device
mount: /dev/fd0 is not a valid block device
mount: /dev/fd0 is not a valid block device
mount: /dev/fd0 is not a valid block device
0

Hello? There were errors and still it reports an exit status of 0?

-- 
Ralf Hildebrandt (Im Auftrag des Referat V A)   Ralf.Hildebrandt@charite.de
Charite Campus Virchow-Klinikum                 Tel.  +49 (0)30-450 570-155
Referat V A - Kommunikationsnetze -             Fax.  +49 (0)30-450 570-916
Real programmers don't bring brown-bag lunches.  If the vending
machine doesn't sell it, they don't eat it.  Vending machines don't
sell quiche.