tape-admin: cleanup ERRFILE handling

* remove stale error-file
* mtx shouldn't write to stdout

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
2018-11-29 10:33:08 +01:00
parent 9a952e8f50
commit 3e36474317

View File

@@ -604,6 +604,7 @@ ltfs_mount () {
${LTFS} -o devname=$ltfs_devname -o verbose=0 $ltfs_mountpoint 1>/dev/null 2>${ERRFILE}
fi
if [ $? -eq 0 ]; then
rm -f ${ERRFILE}
return 0
else
# format tape if needed
@@ -1176,7 +1177,7 @@ mtx_load () {
fi
make_err_file
${MTX} -f $changer_device load $slot_source $drive 2>${ERRFILE}
${MTX} -f $changer_device load $slot_source $drive 1>/dev/null 2>${ERRFILE}
RET=$?
rm -f ${ERRFILE}
}