help-cfengine
[Top][All Lists]
Advanced

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

Re: The ongoing relstring saga


From: rader
Subject: Re: The ongoing relstring saga
Date: Thu, 10 Mar 2005 10:35:02 -0600

 > From: Erik Williamson
 > Sorry for starting a new thread, I accidently deleted the other.
 > 
 > Steve was right, myself being new to Scientific Linux I didn't think to 
 > take into account the Fermi and Cern branches.  So, with that in mind, 
 > here's yet another attempt at this.  I thought that the SL, CERN and 
 > FERMI branches could be treated as editions (like AS, WS, etc with RHEL)

It appears (ala sl-release-3.0.4-7.4.noarch.rpm) that the
/etc/redhat-release for lts304 (FERMI SL) reads

 Scientific Linux SL Release 3.0.4 (SL)

so the FERMI stuff in your patch would be deadwood.  

steve 
- - - 
systems & network manager
high energy physics
university of wisconsin

 > So, with this patch, the following classes are defined on my machine:
 > 
 > redhat scientific scientific_sl scientific_sl_4 scientific_sl_4_0
 > 
 > Similarly, for a Cerm machine, you would get these:
 > 
 > redhat scientific scientific_cern scientific_cern_4 scientific_cern_4_0
 > 
 > Provided I've got the strings correct.  Anyhow,  Let me know your 
 > thoughts, etc.  Hopefully this could be useful to people - if not, I can 
 > just patch it locally.
 > 
 > Thanks,
 > Erik.
 > 
 > -- 
 > e r i k   w i l l i a m s o n                     erik@cpsc.ucalgary.ca
 >   system admin . department of computer science . university of calgary
 > 
 > 
 > --------------000506080002030301040703
 > Content-Type: text/x-patch;
 >  name="scientificlinux.patch"
 > Content-Transfer-Encoding: 7bit
 > Content-Disposition: inline;
 >  filename="scientificlinux.patch"
 > 
 > --- misc.c.orig      2005-03-09 11:00:30.857545112 -0700
 > +++ misc.c   2005-03-09 10:57:52.959549256 -0700
 > @@ -972,6 +972,9 @@
 >  #define MANDRAKE_10_1_ID "Mandrakelinux"
 >  #define FEDORA_ID "Fedora Core"
 >  #define WHITEBOX_ID "White Box Enterprise Linux"
 > +#define SCIENTIFIC_SL_ID "Scientific Linux SL"
 > +#define SCIENTIFIC_CERN_ID "Scientific Linux CERN"
 > +#define SCIENTIFIC_FERMI_ID "Scientific Linux FERMI"
 >   
 >  #define RELEASE_FLAG "release "
 >  
 > @@ -985,6 +988,7 @@
 >   * Red Hat Enterprise Linux ES release 2.1 (Panama)
 >   * Fedora Core release 1 (Yarrow)
 >   * White Box Enterprise linux release 3.0 (Liberation)
 > + * Scientific Linux SL Release 4.0 (Beryllium)
 >   */
 >  
 >  #define RH_REL_FILENAME "/etc/redhat-release"
 > @@ -1059,6 +1063,21 @@
 >      {
 >      vendor = "whitebox";
 >      }
 > + else if(!strncmp(relstring, SCIENTIFIC_SL_ID, strlen(SCIENTIFIC_SL_ID)))
 > +    {
 > +    vendor = "scientific";
 > +    edition = "sl";
 > +    }
 > + else if(!strncmp(relstring, SCIENTIFIC_CERN_ID, strlen(SCIENTIFIC_CERN_I
 > D)))
 > +    {
 > +    vendor = "scientific";
 > +    edition = "cern";
 > +    }
 > + else if(!strncmp(relstring, SCIENTIFIC_FERMI_ID, strlen(SCIENTIFIC_FERMI
 > _ID)))
 > +    {
 > +    vendor = "scientific";
 > +    edition = "fermi";
 > +    }
 >   else
 >      {
 >      Verbose("Could not identify OS distro from %s\n", RH_REL_FILENAME);
 > @@ -1071,6 +1090,15 @@
 >    * have the word 'release' before the numerical release.
 >    */
 >   
 > +  /* Convert relstring to lowercase so that vendors like
 > +    Scientific Linux don't fall through the cracks.
 > +  */
 > + int i;
 > + for (i = 0; i < strlen(relstring); i++)
 > +   {
 > +   relstring[i] = tolower(relstring[i]);
 > +   }
 > + 
 >   release = strstr(relstring, RELEASE_FLAG);
 >   if(release == NULL)
 >      {
 > 
 > --------------000506080002030301040703
 > Content-Type: text/plain; charset="us-ascii"
 > MIME-Version: 1.0
 > Content-Transfer-Encoding: 7bit
 > Content-Disposition: inline
 > 
 > _______________________________________________
 > Help-cfengine mailing list
 > Help-cfengine@gnu.org
 > http://lists.gnu.org/mailman/listinfo/help-cfengine
 > 
 > --------------000506080002030301040703--
 > 





reply via email to

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