Jorge Almeida wrote:
> How can a script decide whether Shorewall is started?
> Should it grep the output of "shorewall status" for "State:Started" or
> is it enough to check the exit code? I'm assuming that the exit code is
> 0 if, and only if, shorewall is started. Is this correct?
> 

That is correct. With current versions of Shorewall, the exit code from
"shorewall status" reflects the state. If the exit code is zero, then
Shorewall is started. If the exit code is non-zero, then Shorewall is
not started.

-Tom
-- 
Tom Eastep    \ Nothing is foolproof to a sufficiently talented fool
Shoreline,     \ http://shorewall.net
Washington USA  \ [EMAIL PROTECTED]
PGP Public Key   \ https://lists.shorewall.net/teastep.pgp.key

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to