Uh oh!
There was an error while loading. Please reload this page.
improved detection of distro_name() - #3
Conversation
using executable lsb_release or files: /etc/lsb-release /etc/os-release to determine short distro id also adding debian_version to sentinel files - allowing fallback detection of debian (or derived) system.
bitprophet
commented
Jun 18, 2012
Thanks, this looks good, though I haven't had time to test it out yet. One question: would it make sense to replace the Granted, If something is 1 line in |
alekibango
commented
Jun 19, 2012
my awk code should be multiplatform enough :) but ok, i somewhat agree with rewrite in that case, we should imho write simple functions for some generic operations... |
There was a problem hiding this comment.
Spun up a Centos 5.7 box today and noticed it only has /etc/redhat-release, no centos-release. (The file does contain "CentOS" though.)
There was a problem hiding this comment.
That's true that I saw this file on CentOS 6.2 and havn't thinked to look at 5.X.
In all cases, RHEL and CentOS are similar and should works identically (and if it's a problem, I guess it must read redhat-release and parse it.
using executable lsb_release
or files:
/etc/lsb-release
/etc/os-release
to determine short distro id
also adding debian_version to sentinel files - allowing fallback
detection of debian (or derived) system.