[CentOS-devel] enhancing /etc/*-release

Thu Apr 2 15:27:29 UTC 2015
Les Mikesell <lesmikesell at gmail.com>

On Thu, Apr 2, 2015 at 6:51 AM, Nico Kadel-Garcia <nkadel at gmail.com> wrote:
> >
> And in *all* the old management tools that need to detect the
> operating system, even the obsolete releases.Please don't muck with
> stable workflow: And for the inevitable XKCD cartoon about this:
>       https://xkcd.com/1172/

Sigh... This is why we can't have nice things.   I've always thought
that computer scientists and engineers could all have had great
careers as legislators and lawers because they never do the simple,
understandable thing and instead always have a million variations of
what you are looking for bundled  inside of even more irrelevant
stuff.  So instead of a standard one-line file installed without the
heavyweight lsb packaged stuff or an even more sensible option to
uname where you'd expect it,  we need stuff like this code from
OCSinventory just to identify the distribution.
(and that's just for Linux - back up to the OS level for other
unix-like flavors and there's a whole different agent for windows).

Anyway, zooming in to:
(a whole file/module  just dedicated to finding the version on a
Centos system, and it doesn't work)
We see that it won't work on CentOS 7 because it's not expecting a
symlink (lines 7 and 8).   So it fails and falls through to the method
that requires the lsb package to be installed -  and just reports
'Linux' if that fails too.

Why does something this simple have to waste so much time?

  Les Mikesell
     lesmikesell at gmail.com