help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RedHat Enterprise patch


From: Jeff Bastian
Subject: RedHat Enterprise patch
Date: Wed, 12 Nov 2003 18:36:34 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031022

I've added a few lines to src/misc.c to support the new format of /etc/redhat-release for RedHat Enterprise 3. Attached is the patch.

-----------------
Jeff Bastian
Unix System Admin
Texas Instruments
-----------------
diff -urN cfengine-2.1.0p1/src/misc.c cfengine-2.1.0p1.rhel3/src/misc.c
--- cfengine-2.1.0p1/src/misc.c 2003-10-11 12:14:12.000000000 -0500
+++ cfengine-2.1.0p1.rhel3/src/misc.c   2003-11-12 18:27:54.000000000 -0600
@@ -827,7 +827,10 @@
 {
 #define REDHAT_ID "Red Hat Linux"
 #define REDHAT_AS_ID "Red Hat Linux Advanced Server"
-#define REDHAT_ES_ID "Red Hat Enterprise Linux ES"
+/* #define REDHAT_ES_ID "Red Hat Enterprise Linux ES" */
+#define RHEL_AS_ID "Red Hat Enterprise Linux AS"
+#define RHEL_ES_ID "Red Hat Enterprise Linux ES"
+#define RHEL_WS_ID "Red Hat Enterprise Linux WS"
 #define MANDRAKE_ID "Linux Mandrake"
 
 #define RELEASE_FLAG "release "
@@ -838,6 +841,9 @@
  * Red Hat Linux Advanced Server release 2.1AS (Pensacola)
  * Linux Mandrake release 7.1 (helium)
  * Red Hat Enterprise Linux ES release 2.1 (Panama)
+ * Red Hat Enterprise Linux AS release 3 (Taroon)
+ * Red Hat Enterprise Linux ES release 3 (Taroon)
+ * Red Hat Enterprise Linux WS release 3 (Taroon)
  */
 
 #define RH_REL_FILENAME "/etc/redhat-release"
@@ -871,11 +877,21 @@
  Verbose("Looking for redhat linux info...\n");
  
  /* First, try to grok the vendor and the edition (if any) */
- if(!strncmp(relstring, REDHAT_ES_ID, strlen(REDHAT_ES_ID)))
+ if(!strncmp(relstring, RHEL_AS_ID, strlen(RHEL_AS_ID)))
+    {
+    vendor = "redhat";
+    edition = "as";
+    }
+ else if(!strncmp(relstring, RHEL_ES_ID, strlen(RHEL_ES_ID)))
     {
     vendor = "redhat";
     edition = "es";
     }
+ else if(!strncmp(relstring, RHEL_WS_ID, strlen(RHEL_WS_ID)))
+    {
+    vendor = "redhat";
+    edition = "ws";
+    }
  else if(!strncmp(relstring, REDHAT_AS_ID, strlen(REDHAT_AS_ID)))
     {
     vendor = "redhat";
@@ -916,6 +932,7 @@
        sprintf(strminor, "%d", minor);
        }
     /* red hat 9 is *not* red hat 9.0. */
+    /* red hat enterprise 3 is also a major number only */
     else if (sscanf(release, "%d", &major) == 1)
        {
        sprintf(strmajor, "%d", major);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]