Poil/Useful-Linux-Scripts — pull request #1 by eLvErDe (2013-07-27 13:45:20+00:00)
Title: Handle controllers with no BBU and don't treat spun down disks as errors

Hi!

Finally I found some time to learn git and tried your fixed version of megaclisas-status on a few controllers.
Here are my fixes.

A few notes:

* BBU attributes are initialized as unknown to be treat as error if parsing fails
* I hardened all regular expressions
* If BatteryType isn't found, there's no BBU so return None and don't try to use this later
* I have no idea what you meant when writing "if bbustatus['type'] in ['iBBU08','iBBU']:". It always return "BBU" for me and I'd rather test "None" to see if returnBBUInfo function found something or not, what you think ?

So I hope you'll merge it. It would be nice to work together on this tools.
There's a last thing I need to fix before release: "nagioshost" hardcoded into the script. However I don't use it that way so I don't feel really confident fixing this.... Would you mind convert this variable as a cli argument ?

Regards, Adam.