|
|
fi | fi |
RESULT=`$AMRESTORE -h -p $DEVICE 2> $TEMP/amrestore.out \ | RESULT=`$AMRESTORE -h -p $DEVICE 2> $TEMP/amrestore.out \ |
| doonefile 2> $TEMP/onefile.errors` | | doonefile 2> $TEMP/onefile.errors` |
|
# save previous filename to detect looping |
|
FILE_prev="$FILE" |
FILE=`grep restoring $TEMP/amrestore.out \ | FILE=`grep restoring $TEMP/amrestore.out \ |
| sed 's/^.*restoring //'` | | sed 's/^.*restoring //'` |
EOF=`grep "reached end of tape" $TEMP/amrestore.out` | EOF=`grep "reached end of tape" $TEMP/amrestore.out` |
EOI=`grep "reached end of information" $TEMP/amrestore.out` | EOI=`grep "reached end of information" $TEMP/amrestore.out` |
# amrestore: 0: restoring sundae._mnt_sol1_usr.19961127.1 | # amrestore: 0: restoring sundae._mnt_sol1_usr.19961127.1 |
if [ X"$FILE" != X"" -a X"$RESULT" = X"0" ]; then |
if [ X"$FILE" != X"" -a X"$FILE" != X"$FILE_prev" -a X"$RESULT" = X"0" ]; then |
report "Checked $FILE" | report "Checked $FILE" |
elif [ X"$FILE" != X"" -a X"$RESULT" = X"500" ]; then |
elif [ X"$FILE" != X"" -a X"$FILE" != X"$FILE_prev" -a X"$RESULT" = X"999" ]; then |
report "Skipped `cat $TEMP/onefile.cmd` check on partial dump $FILE" | report "Skipped `cat $TEMP/onefile.cmd` check on partial dump $FILE" |
dump="`echo $FILE | cut -d'.' -f'1,2,3,4'`" | dump="`echo $FILE | cut -d'.' -f'1,2,3,4'`" |
cat $TEMP/onefile.partnum >> $TEMP/$dump.parts | cat $TEMP/onefile.partnum >> $TEMP/$dump.parts |