TAPE=`amgetconf$SUF tapedev`
if test X"$TAPE" == X""; then
- echo "<none> tapedev not specified in amanda.conf." 1>&2
+ echo "<none> tapedev not specified in amanda.conf."
exit 2
fi
SLOTDIR=`echo $TAPE | sed 's/^file://'`
# Need rwx access to the virtual tape itself.
if ! test -d $SLOTDIR; then
- echo "Virtual-tape directory $SLOTDIR does not exist." 1>&2
+ echo "<none> Virtual-tape directory $SLOTDIR does not exist."
exit 2
fi
if ! test -w $SLOTDIR; then
- echo "Virtual-tape directory $SLOTDIR is not writable." 1>&2
+ echo "<none> Virtual-tape directory $SLOTDIR is not writable."
exit 2
fi
CFDir=`dirname ${CHANGERFILE}`
[ -d ${CFDir} -a -r ${CFDir} -a -w ${CFDir} -a -x ${CFDir} ] ||
- { echo "$MYNAME: need 'rwx' access to '$CFDir'" 1>&2 ; exit 2 ; }
+ { echo "<none> $MYNAME: need 'rwx' access to '$CFDir'"; exit 2 ; }
# check or create changer metadata files
ACCESSFILE=$CHANGERFILE-access
[ -f $ACCESSFILE -a -r $ACCESSFILE -a -w $ACCESSFILE ] ||
echo 0 > $ACCESSFILE ||
- { echo "$MYNAME: could not access or create '$ACCESSFILE'" 1>&2 ; exit 2 ; }
+ { echo "<none> $MYNAME: could not access or create '$ACCESSFILE'" ; exit 2 ; }
CLEANFILE=$CHANGERFILE-clean
[ -f $CLEANFILE -a -r $CLEANFILE -a -w $CLEANFILE ] ||
echo 0 > $CLEANFILE ||
- { echo "$MYNAME: could not access or create '$CLEANFILE'" 1>&2 ; exit 2 ; }
+ { echo "<none> $MYNAME: could not access or create '$CLEANFILE'" ; exit 2 ; }
SLOTFILE=$CHANGERFILE-slot
[ -f $SLOTFILE -a -r $SLOTFILE -a -w $SLOTFILE ] ||
echo 0 > $SLOTFILE ||
- { echo "$MYNAME: could not access or create '$SLOTFILE'" 1>&2 ; exit 2 ; }
+ { echo "<none> $MYNAME: could not access or create '$SLOTFILE'" ; exit 2 ; }
# read and check metadata
ACCESSCOUNT=`cat $ACCESSFILE`
eject
;;
*)
- echo "Unknown option $1"
+ echo "<none> Unknown option $1"
exit 2
;;
esac