Hello Arno,

> There will be some reason why your tapealert command output isn't 
> matched by grep. You'll ony see what happens behind the scenes if you 
> try the tapealert command Bacula runs and look at the output, not 
> piped through grep.

This is a misunderstanding or maybe I didn't tell you. I did what
you suggested. Here it is without tape in drive:

Product Type: Tape Drive
Vendor ID: 'SEAGATE '
Product ID: 'DAT    DAT72-052'
Revision: 'A060'
Attached Changer: No
SerialNumber: xxxx # you don't need to know this.
MinBlock:1
MaxBlock:16777215
SCSI ID: 0
SCSI LUN: 0
Ready: no

Here it is with tape in drive:

Vendor ID: 'SEAGATE '
Product ID: 'DAT    DAT72-052'
Revision: 'A060'
Attached Changer: No
SerialNumber: xxxx
SCSI ID: 0
SCSI LUN: 0
Ready: yes
BufferedMode: yes
Medium Type: 0x35
Density Code: 0x47
BlockSize: 0
DataCompEnabled: no
DataCompCapable: yes
DataDeCompEnabled: yes
CompType: 0x20
DeCompType: 0x20
BOP: yes
Block Position: 0

So no 'TapeAlert' line present at the moment, but the drive is capable
of TapeAlert, as I read TapeAlert: -stuff- need cleaning -stuff- a few
days ago.

So it is possible to have no 'TapeAlert' in tapeinfo output. I was just 
wondering that nobody else had similar problems.

To solve this I wrote a script that executes the command, gives
the desired output and exits with 0 if grep exits with 0 or 1 and
it exits with 1 if grep exits with 2.

Actually my Subject line is not precise.

Your sincerely,

Eric 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to