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.
|
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 |
|
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.