On 4/2/15 3:28 AM, Anders F Björklund wrote: > Karanbir Singh wrote: >>> another less-than-optimal solution would be for app developers to >>> start using lsb_release to find out what distro and release they >>> are installing onto. of course, that's a different problem, in more >>> than one way, at least one of which is that lsb_release is not installed >>> by default. >>> >>> I'm switching the app installer for the program I maintain (at work) >>> to use lsb_release just because it's so much easier than groping >>> /etc/redhat-release. >> have you looked at /etc/os-release ? you can just source it and you get >> the content needed. I believe most people are trying to drive towards >> using that ( plus you dont need the lsb dep chain under it then ) > > Bryan Seitz wrote: > >> Team, >> >> 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 ? > Might as well use `/usr/bin/lsb_release` (and redhat-lsb-core) then. > > * http://0pointer.de/blog/projects/os-release.html > > Ironically it doesn't even contain the name of the Operating System... > We saw this when it was introduced in (and broke) PackageKit earlier. > > I don't think it's possible to change all redhat-release usage anyway. Even redhat-lsb-core installs an insane amount of garbage just to get that one function we want. Other distributions (At least Debian/Ubuntu) already use /etc/os-release and there is no reason it cannot be populated by the centos-release package on C5/C6 as well. It is a good idea, the file has useful and standard contents, and it just works. I am not advocating doing away with the legacy files, but this solution just makes sense and is the right thing to do moving forward.