From a4e6d3b42e38af2a79da7466f06751003fd9243f Mon Sep 17 00:00:00 2001 From: Ralf Zerres Date: Tue, 9 Oct 2018 11:28:54 +0200 Subject: [PATCH] tape-admin: respect 'tape in use' in ltfs_unmount * signal error, since tape can't be used for backup Signed-off-by: Ralf Zerres --- bin/tape-admin | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/tape-admin b/bin/tape-admin index 3a3ae5f..67584fc 100755 --- a/bin/tape-admin +++ b/bin/tape-admin @@ -716,6 +716,12 @@ ltfs_umount () { "$ltfs_mountpoint" fi return 0 + elif [ $? -eq 32 ]; then + if [ $verbose -ge 2 ]; then + printf "${RED}Error: ${MAGENTA}LTFS tape ${GREEN}'%s'${MAGENTA} is in use!${NO_COLOR}\n" \ + "$ltfs_mountpoint" + fi + return 1 else return 1 fi