Index: changer-src/chg-zd-mtx.sh.in
===================================================================
RCS file: /cvsroot/amanda/amanda/changer-src/chg-zd-mtx.sh.in,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 chg-zd-mtx.sh.in
--- changer-src/chg-zd-mtx.sh.in	1998/09/23 02:39:43	1.1.2.2
+++ changer-src/chg-zd-mtx.sh.in	2000/11/08 20:56:07
@@ -46,11 +46,30 @@
 cleanfile=$changerfile-clean
 accessfile=$changerfile-access
 slotfile=$changerfile-slot
-[ ! -f $cleanfile ] && echo 0 > $cleanfile
-[ ! -f $accessfile ] && echo 0 > $accessfile
-[ ! -f $slotfile ] && echo 0 > $slotfile
+[ ! -s $cleanfile ] && echo 0 > $cleanfile
+[ ! -s $accessfile ] && echo 0 > $accessfile
+[ ! -s $slotfile ] && echo 0 > $slotfile
 cleancount=`cat $cleanfile`
+if expr $cleancount + 1000000 > /dev/null 2>&1
+then
+  : # the number is OK
+else
+  cleancount=0
+fi
 accesscount=`cat $accessfile`
+if expr $accesscount + 1000000 > /dev/null 2>&1
+then
+  : # the number is OK
+else
+  accesscount=0
+fi
+slot=`cat $slotfile`
+if expr $slot + 1000000 > /dev/null 2>&1
+then
+  : # the number is OK
+else
+  echo 0 > $slotfile
+fi
 #
 
 readstatus() {
