#
# The script is halfway Norwegian and halfway English. Newer modifications are
# in English, we should probably stick to that.
-#
-# Known issues:
-#
-# o $R has no proper meaning because of the forking subshell stuff. We need a
-# more robust way of returning non-zero on errors, which we probably don't
-# right now.
-#
# The computer to backup.
computer=$1
echo `date`" $computer: Running $TARCMD" >&2
eval $TARCMD > $DATE.idx
- if [ -s $TARFILE ]; then
- # File is >0 in size, we assume it worked.
+ if [ $? -eq 0 ] && [ -s $TARFILE ]; then
+ # File is >0 in size and neither cat or tar tzvf failed; we assume it worked.
# Move tar file in place
mv $TARFILE $DATE.tgz