On Tue, Jun 10, 2014 at 12:59:58PM -0500, Les Mikesell wrote:
On Tue, Jun 10, 2014 at 12:24 PM, Karanbir Singh mail-lists@karan.org wrote:
On 06/10/2014 06:01 PM, Manuel Wolfshant wrote:
lsb-release is useless, it pipes out the text read from /etc/redhat-release
but lsb-release will give you relevant content even if you are on a distro that has no /etc/redhat-release
which is kind of the point of having a single tool that can be used across distros.
How is running a program that isn't there any more useful than reading a file that isn't there?
Heh. Obviously, it isn't.
But I thank all of you who've responded, it's been educational!
the current installer I'm using (a large-ish shellscript) goes to some effort to parse fields out of /etc/redhat-release on either RHEL or Centos. Since RHEL and Centos don't necessarily have the same (or even highly similar) text in that file, there's a lot of nearly duplicate code in the script.
The output of lsb_release looks as if it can be parsed more easily, for my purposes (e.g.: lsb_release -i -r). since I have input on what packages get installed, as well as the installer program, I can request that the package containing lsb_release also be installed, thereby saving some nontrivial number of lines of code in the installer.
thanks again for all who responded.