(imported topic written by SystemAdmin)
Need to determine oS release (ie Enterprise-release-4 or redhat-release-4) also 32 or 64bit
Writing a fixlet to download the appropriate yum *.repo files for the matching Linux OS
(imported topic written by SystemAdmin)
Need to determine oS release (ie Enterprise-release-4 or redhat-release-4) also 32 or 64bit
Writing a fixlet to download the appropriate yum *.repo files for the matching Linux OS
(imported comment written by Lee Wei)
Hello jrbast,
First of all, I just want to make sure that you know there are QNA relevance debugger on Red Hat so easier testing.
http://support.bigfix.com/cgi-bin/kbdirect.pl?id=347
For Red Hat, the most accurate is to use the /etc/redhat-release file.
Here is an example to determine if the system is running Enterprise Release 4 (either Advanced, Enterprise, or Workstation)
exists file "/etc/redhat-release" whose (exists line whose (exists match (regex "Red Hat Enterprise Linux (AS|ES|WS) release 4") of it) of it)
To determine if it is a 64bit OS, try this:
architecture of operating system = "x86_64"
Lee Wei
(imported comment written by SystemAdmin)
Using /etc/redhat-release is not reliable becase at our site, we use both redhat and OEL (Oracle Enterprise Linux) and have to edit this file to trick software installs into thinking there installing on redhat on oel systems.
(imported comment written by JackCoates91)
Oracle suggests /etc/enterprise-release. http://www.oracle.com/us/technologies/027626.pdf
(imported comment written by jugrknot91)
You can also use “uname -a && cat /etc/*release” to get full info, on so other version of linux like Slackware you will need to use “uname -a && cat /etc/*version”
Output Sample:
Linux servername 2.6.16.60-0.54.5-default #1 Fri Sep 4 01:28:03 UTC 2009 i686 i686 i386 GNU/Linux
LSB_VERSION=“core-2.0-noarch:core-3.0-noarch:core-2.0-ia32:core-3.0-ia32”
SUSE Linux Enterprise Server 10 (i586)
VERSION = 10
PATCHLEVEL = 3