]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix #7214 Adapt mtx-changer.conf for GNU cpio mt version
authorEric Bollengier <eric@baculasystems.com>
Thu, 31 Dec 2020 08:46:52 +0000 (09:46 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:02:58 +0000 (09:02 +0100)
bacula/scripts/mtx-changer.conf

index 981efb9e3e4b1c0a9ad63e5383a88a8c9d8b86ce..8d51170029b0a5ce7edfc2302d92311b1d472dff 100644 (file)
@@ -67,6 +67,7 @@ idbglvl=10
 #    When a tape is in the drive, it prints user unfriendly output.
 #  Note, with Ubuntu Gusty (8.04), there are two versions of mt,
 #    so we attempt to figure out which one.
+#  Note, with mt GNU cpio, we use "drive status" output
 #
 
 OS=`uname`
@@ -84,6 +85,11 @@ case ${OS} in
        if test $? -eq 1 ; then
           ready="drive status"
        fi
+    else
+        mt --version|grep "GNU cpio" >/dev/null 2>&1
+        if test $? -eq 0 ; then
+           ready="drive status"
+        fi
     fi
   ;;
 esac