]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Revert "Fix #9882 About tapealert script issue on rhel8"
authorEric Bollengier <eric@baculasystems.com>
Fri, 22 Mar 2024 08:40:08 +0000 (09:40 +0100)
committerEric Bollengier <eric@baculasystems.com>
Fri, 22 Mar 2024 08:40:19 +0000 (09:40 +0100)
This reverts commit b677c0739d72a08997623d76bcc386bf37efd12e.

The tapealert tool is not supposed to convey the error from
tapealert.

The excelent bacula-tapealert tool can also be used
https://github.com/waa/bacula-tapealert

bacula/scripts/tapealert

index 42a3dd4e16661d9488ba7411c5608f7113a0d469..c8c68c0adbe0224efdf766cfb2f7765e7b3c4ba8 100755 (executable)
@@ -34,17 +34,13 @@ fi
 
 
 if [ x$DEBUG = x ] ; then
-out=`mktemp`
-$tapeinfo -f $1 >$out
-ret=$?
-awk '/^TapeAlert/ { $1=""; gsub(/^ */, "", $0); print $0 }' $out
-rm -f $out
-exit $ret
+$tapeinfo -f $1 |grep "^TapeAlert" - |cut -b1-13
+exit $?
 
 else
 
 # For testing only
-cat <<EOF |grep "^TapeAlert" - | awk '/^TapeAlert/ { $1=""; gsub(/^ */, "", $0); print $0 }'
+cat <<EOF |grep "^TapeAlert" - |cut -b1-13
 Product Type: Tape Drive
 Vendor ID: 'IBM     '
 Product ID: 'ULTRIUM-TD6     '