From b677c0739d72a08997623d76bcc386bf37efd12e Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 16 Feb 2023 15:45:48 +0100 Subject: [PATCH] Fix #9882 About tapealert script issue on rhel8 Thanks Oliver Schonefeld --- bacula/scripts/tapealert | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bacula/scripts/tapealert b/bacula/scripts/tapealert index c8c68c0ad..42a3dd4e1 100755 --- a/bacula/scripts/tapealert +++ b/bacula/scripts/tapealert @@ -34,13 +34,17 @@ fi if [ x$DEBUG = x ] ; then -$tapeinfo -f $1 |grep "^TapeAlert" - |cut -b1-13 -exit $? +out=`mktemp` +$tapeinfo -f $1 >$out +ret=$? +awk '/^TapeAlert/ { $1=""; gsub(/^ */, "", $0); print $0 }' $out +rm -f $out +exit $ret else # For testing only -cat <