Bacula-users

Re: [Bacula-users] Run Before Job parameter

2010-01-26 13:23:34
Subject: Re: [Bacula-users] Run Before Job parameter
From: Martin Simmons <martin AT lispworks DOT com>
To: tecnicos AT aomail.uab DOT es
Date: Tue, 26 Jan 2010 18:21:19 GMT
> if ( echo "sta client=${jobClient}" | bconsole | grep -v -q "Failed to 
> connect to Client" ); then

You can't do it with grep -v because it will match all other lines.

You need to use grep without -v and then swap the exit 0 and exit 1 cases.

__Martin

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>