On Mon, Apr 8, 2013 at 4:30 PM, S. Dale Morrey <[email protected]> wrote:
> This got me thinking, is there a correct way to check this sort of thing?
> Something that's going to be consistent, at least across direct derivations
> such as RHEL & CentOS?

Unfortunately some distros don't conform to LSB standards (including
CentOS), so you'll need some fallback methods.
/etc/os-release would probably be your best bet.

An example (Python) is available within the Salt source code:
https://github.com/saltstack/salt/blob/develop/salt/grains/core.py
Function at Line 554

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to