help-cfengine
[Top][All Lists]
Advanced

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

Re: Platform string


From: Shawn Ferry
Subject: Re: Platform string
Date: Mon, 8 Sep 2003 16:13:00 -0400
User-agent: Mutt/1.4i

I can't think of an "automatic" way to do it, but the following
should work. 

control:

        sunos_sun4u_5_7::
                OS = ( 5.7 )
                arch = ( sun4u )

        sunos_sun4m_5_8::
                OS = ( 5.8 )
                arch = ( sun4m )

or possibly a bit more easily extensible:

        sun4m::
                arch = ( sun4m )
        sun4u::         
                arch = ( sun4u )

        sunos_5_7::
                OS = ( 5.7 )    

        sunos_5_8::
                OS = ( 5.8 )


Quoting Ferguson, Steve <Steve.Ferguson@gedas.com> on Mon, Sep 08, 2003 at 
02:40:02PM -0400:
> I don't know how I can take those classes and insert them in a string.  I
> need something I can declare in a variable.  I'm using it something like
> this in update.conf:
> 
>   master_binaries = ( /var/cfengine/master/binaries/$(arch) )
> 
>   # Update important binaries
>   $(master_binaries)/cfagent    dest=$(workdir)/bin/cfagent
>                                 mode=0755
>                                 backup=false
>                                 type=checksum
>                                 server=$(policyhost)
> 
> I know that the classes you mentioned are defined, but not how to get those
> tokens in place of $(arch).
> 
> Steve
> 
> > -----Original Message-----
> > From: Jeff Wasilko [mailto:jeffw@smoe.org]
> > Sent: Monday, September 08, 2003 2:37 PM
> > To: Ferguson, Steve
> > Cc: Cfengine List (E-mail)
> > Subject: Re: Platform string
> > 
> > 
> > On Mon, Sep 08, 2003 at 01:28:05PM -0400, Ferguson, Steve wrote:
> > > I'm looking to create a variable that can give me essentially this:
> > > 
> > > uname -sr | tr ' ' '_'
> > > 
> > > E.g.
> > > 
> > > SunOS_5.8
> > > HP-UX_B.11.00
> > > Linux_2.4.20-20.9
> > 
> > In cfengine 2.0x, I get classes like this, which look close to
> > what you want:
> > 
> > 
> > sunos_5_9 sunos_sun4u_5_9 
> > 
> > The dot wouldn't be valid in a class name, IIRC.
> > 
> > -j
> > 
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-cfengine

-- 
Shawn Ferry       sferry@sevenspace.com                                         
                                                                             
SevenSpace        Technical Lead and Sr. Principal Systems Engineer             
                                                                             
866.377.7223      www.sevenspace.com                                            
                                                                             




reply via email to

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