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

Thu Apr 2 10:49:25 UTC 2015
Anders F Björklund <afb at users.sourceforge.net>

Peter wrote:

>>>  I would love to see /etc/os-release added to CentOS5 and CentOS6 as well.  Keep up the good work!
>> But os-release is a systemd "feature"*. Seems unlikely to make it ?
> Really?  On my system it's a very simple text file included with the
> centos-release package.  I honestly can't see how having sys-v-init or
> upstart would make it impossible or even remotely difficult to create
> such a text file and include it in CentOS 5 and 6.

Sure, and as such it's probably "better" than the lsb_release *program*.
But you would still have to install something extra, in the old releases ?

Most downstream usage of the distro/release is plain wrong*, anyway...

* easier to check a name/version, than to bother with packages and so-files
and programs and other dependencies... just hope they don't rebase anything.

Go ahead and use the silly name of the distro file. I'm sure I'll survive :-)

>> I don't think it's possible to change all redhat-release usage anyway.
> Well, fortunately it's not redhat-release, that's a package that comes
> with RHEL.  CentOS comes with the package centos-release which is
> specific to CentOS and therefore we should be able to make changes to
> without worrying about upstream constraints.

Actually I think there was an effort to rename it as /etc/system-release,
but not sure it caught on ? The "traditional" was always redhat-release...

And sure, centos-release is specific to CentOS just as fedora-release is
specific to Fedora. But ignoring upstream/legacy constraints seems wrong ?

i.e. /etc/redhat-release is a symlink to it, so the syntax does matter.

But it seems that /etc/centos-release-upstream will provide the new info.
Hopefully that (and your os-release) will be enough to make everyone happy.

And for the OS rant earlier, I suppose there's always uname(1) and arch(1).