The situation is the following:
I am writing a script to do a backup, in the case the backup failed (bad tape, or write protected tape, etc etc), then it should warn the operator that the backup was not successful, and ask if they want to retry or not. I use error output of tar. If backup was successful, err=0, if there was an error, err<>0. This works fine in case there is no tape in the drive, or the tape is bad or if there was a write error... BUT when I put in a write protected tape the err=0(from tar)!! As if everything worked fine, and the backup was written to the tape. Why is this happening and how can I fix it? I am getting the message from the system that write failed, because of write-protected tape, but still tar thinks everything was ok!
I am running sco open server 5.0.5
any help or advice is much appreciated
thanx
NF
I am writing a script to do a backup, in the case the backup failed (bad tape, or write protected tape, etc etc), then it should warn the operator that the backup was not successful, and ask if they want to retry or not. I use error output of tar. If backup was successful, err=0, if there was an error, err<>0. This works fine in case there is no tape in the drive, or the tape is bad or if there was a write error... BUT when I put in a write protected tape the err=0(from tar)!! As if everything worked fine, and the backup was written to the tape. Why is this happening and how can I fix it? I am getting the message from the system that write failed, because of write-protected tape, but still tar thinks everything was ok!
I am running sco open server 5.0.5
any help or advice is much appreciated
thanx
NF