[libvirt] [test-API PATCH 1/6] Slight cross-distribution support

Martin Kletzander mkletzan at redhat.com
Tue Mar 27 08:44:00 UTC 2012


On 03/27/2012 10:32 AM, Christophe Fergeau wrote:
> On Mon, Mar 26, 2012 at 02:42:17PM +0200, Michal Novotny wrote:
>> Fedora is using /etc/redhat-release file so you use the same handling
>> for Fedora and RHEL then it's fine.
> 
> I also have a /etc/fedora-release on my f17. systemd people are pushing for
> standardization around
> http://www.freedesktop.org/software/systemd/man/os-release.html
> 
> Christophe

Oh, didn't know about this, but when I'm looking at it, it reminds me of
http://xkcd.com/927/ =) There is already /etc/issue /etc/issue.net
/etc/<type>-release etc.
I'm aware of these not having very standardized format, but I don't see
any standardized field in /etc/os-release that would tell me on what
type of distribution this particular one was built.
Maybe I'm the only one who wants to get this information using
/etc/*-release, but I want to get it without keeping list of rpm-based
distributions in the code and matching in them with the distribution name.

In this particular case (I needed to know wherther I can use 'rpm' or
not) it seems like the best to check for /etc/redhat-release. It is
there even when you have /etc/<distribution>-release in there.

Anyway, thanks for the info.

Martin




More information about the libvir-list mailing list