Added a sanity check () and changed test -b to test -e for tape device
This commit is contained in:
parent
4859899e5f
commit
943afcf723
@ -47,9 +47,15 @@ for i in $Ls $Tar $Sort $Tail $Uniq $Mount $Umount $Mt $Cp $Mkdir; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Check that BackupDir exists
|
||||||
|
if [ ! -d $BackupDir ]; then
|
||||||
|
echo "$BackupDir dosen't seem to exist, aborting" > /dev/stderr
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
# Check that our tape drive is on and connected and a tape is inserted
|
# Check that our tape drive is on and connected and a tape is inserted
|
||||||
if [ "$Where" = "Tape" ] || [ "$Where" = "Tape&HDD" ]; then
|
if [ "$Where" = "Tape" ] || [ "$Where" = "Tape&HDD" ]; then
|
||||||
if [ ! -b $TapeDev ]; then
|
if [ ! -e $TapeDev ]; then
|
||||||
echo "$CurTime No tape device present at $TapeDev" > /dev/stderr
|
echo "$CurTime No tape device present at $TapeDev" > /dev/stderr
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user