Code review request for Linux version id fix (6986195)

Omair Majid omajid at redhat.com
Thu Sep 12 14:11:09 PDT 2013


Hi,

On 09/12/2013 04:00 PM, Daniel D. Daugherty wrote:
> The "lsb-release" file is the new Linux standard so it is now in the list.

> I also added the "system-release" and "os-release" files since they are
> an old standard.

Actually, /etc/os-release is a fairly new thing [1] that is required by
systemd. systemd is a new init system (among other things) used by a
number of newer distributions, including Fedora >= 15, RHEL 7 [2], Arch
Linux, and openSUSE [3]. So all these distributions now contain
/etc/os-release. However, even distributions like Debian and Ubuntu
(which only optionally support systemd) provide a valid /etc/os-release
file [4].

In fact, on these distributions, perhaps it should be searched first,
before any of the others. Unlike /etc/lsb-release, /etc/os-release is
always guaranteed to be present on a base install of these distributions.

I see that os_print_info is called by the error handler, so it probably
doesn't matter, but since the format of /etc/os-release is standardized,
it should be possible to seek and print just NAME and VERSION.

Thanks,
Omair

[1] http://www.freedesktop.org/software/systemd/man/os-release.html
[2]
http://rhsummit.files.wordpress.com/2013/06/poettering_f_0945_getting_ready_for_systemd-the-new-red-hat-enterprise-linux-7-service-manager.pdf
[3] http://en.wikipedia.org/wiki/Systemd
[4] https://bugs.launchpad.net/ubuntu/+source/base-files/+bug/947236
-- 
PGP Key: 66484681 (http://pgp.mit.edu/)
Fingerprint = F072 555B 0A17 3957 4E95  0056 F286 F14F 6648 4681


More information about the serviceability-dev mailing list