bug-cfengine
[Top][All Lists]
Advanced

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

Re: more helpful classes for Irix


From: Iain Morgan
Subject: Re: more helpful classes for Irix
Date: Thu, 22 Jan 2004 10:51:27 -0800 (PST)

On Thu Jan 22 10:00:13 2004, Dave Love wrote:
> 
> --Lexis-Nexis-Soviet-Exon-Shell-tempest-JSOFC3IP
> 
> Currently for Irix, the only handle you have on the point release
> version of Irix 6.5 is a class like irix64_ip27_6_5_10070055.  In this
> the last component appears to correspond to the `22' in Irix 6.5.22,
> but the class isn't generally useful because it's conflated with the
> `board type' (?) of the processor, `ip27' in this case.  The point
> release is important for things like installing patches and packages
> generally.
> 
> This change to 2.1.1 adds a class `irix64_6_5_22m' in the above case.
> It's still not really good enough, because I have to test both
> irix64_6_5_22m and irix_6_5_22m, but it does prevent me from having to
> run `uname -sR' to get the information.
> 
> (I'm not sure whether it's the right approach.  It might be OK just to
> have irix64_6_5_10070055, for instance, but that's rather more obscure
> and I may not have been sure how to do it when I looked at it (some
> time ago with 2.1.0p1).)
> 
> 
> --Lexis-Nexis-Soviet-Exon-Shell-tempest-JSOFC3IP
> Content-Type: text/x-patch
> Content-Disposition: inline
> 
> --- nameinfo.c        2004/01/22 17:42:21     1.1
> +++ nameinfo.c        2004/01/22 17:42:38
> @@ -33,6 +33,9 @@
>  #include "cf.defs.h"
>  #include "cf.extern.h"
>  #include "../pub/global.h"
> +#ifdef IRIX
> +#include <sys/syssgi.h>
> +#endif
>  
>  /* FreeBSD has size macro defined as ifreq is variable size */
>  #ifdef _SIZEOF_ADDR_IFREQ
> @@ -53,6 +56,9 @@
>  #ifdef AIX
>    char real_version[_SYS_NMLN];
>  #endif
> +#ifdef IRIX
> +  char real_version[256];    /* see <sys/syssgi.h> */
> +#endif
>  #ifdef HAVE_SYSINFO
>  #ifdef SI_ARCHITECTURE
>    long sz;
> @@ -72,6 +78,9 @@
>  #ifdef AIX
>  snprintf(real_version,_SYS_NMLN,"%.80s.%.80s", VSYSNAME.version, 
> VSYSNAME.release);
>  strncpy(VSYSNAME.release, real_version, _SYS_NMLN);
> +#elif defined IRIX
> +/* This gets us something like `6.5.19m' rather than just `6.5'.  */ 
> + syssgi (SGI_RELEASE_NAME, 256, real_version);
>  #endif 
>  
>  for (sp = VSYSNAME.sysname; *sp != '\0'; sp++)
> @@ -181,6 +190,14 @@
>  
>  snprintf(VBUFF,bufsize,"%s_%s",VSYSNAME.sysname,VSYSNAME.release);
>  AddClassToHeap(CanonifyName(VBUFF));
> +
> +#ifdef IRIX
> +/* Get something like `irix64_6_5_19m' defined as well as
> +   `irix64_6_5'.  Just copying the latter into VSYSNAME.release
> +   wouldn't be backwards-compatible.  */
> +snprintf(VBUFF,bufsize,"%s_%s",VSYSNAME.sysname,real_version);
> +AddClassToHeap(CanonifyName(VBUFF));
> +#endif
>  
>  AddClassToHeap(CanonifyName(VSYSNAME.machine));
>   
> 
> --Lexis-Nexis-Soviet-Exon-Shell-tempest-JSOFC3IP
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
> 
> _______________________________________________
> Bug-cfengine mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-cfengine
> 
> --Lexis-Nexis-Soviet-Exon-Shell-tempest-JSOFC3IP--
> 
> 

While it would be nice to have the built-in ability to distinguish between
the various revs of IRIX 6.5, the following note in the syssgi(2) man page
should not go unnoticed:

         These are all interfaces that are used to implement various
         system library functions.  They are all subject to change and
         should not be called directly by applications.

The approach I've taken is to define a convenient class:

groups:

        irix_6_5_21     = ( irix_ip22_6_5_07141528
                            irix_ip32_6_5_07141529
                            irix64_ip25_6_5_07141529
                            irix64_ip27_6_5_07141529
                            irix64_ip28_6_5_07141529
                            irix64_ip30_6_5_07141529
                          )

One caveat, the kernel revs can be different in the miniroot environment,
so you'll need to take that into account if you run cfengine during roboinst.


--
Iain Morgan
NAS Desktop Support Group




reply via email to

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