[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Platform string
From: |
Ferguson, Steve |
Subject: |
RE: Platform string |
Date: |
Mon, 8 Sep 2003 14:54:09 -0400 |
I can't use these without having to explicitly test for each case, which
kinda defeats the point, in that I don't want to have to manually maintain
the list of operating system versions inside the configuration files. I
envision something more like this (to use a shell metaphor):
platform = ( `uname -sr | tr ' ' '_'`)
which is much more elegant than:
sunos_5_6:: platform = ( sunos_5_6 )
sunos_5_7:: platform = ( sunos_5_7 )
sunos_5_8:: platform = ( sunos_5_8 )
hpux...:: platform = ( hpux... )
hpux...:: platform = ( hpux... )
hpux...:: platform = ( hpux... )
linux...:: platform = ( linux... )
linux...:: platform = ( linux... )
linux...:: platform = ( linux... )
etc.
I'm not looking for a defined class, but a defined variable that I can
insert into an expression.
Steve
> -----Original Message-----
> From: Wheeler, John [mailto:jwheeler@eb.com]
> Sent: Monday, September 08, 2003 2:47 PM
> To: Ferguson, Steve; Cfengine List (E-mail)
> Subject: RE: Platform string
>
>
>
> # on a 2.8 host
> cfagent --verbose --no-splay -p
>
> ...
> Additional hard class defined as: 32_bit
> Additional hard class defined as: sunos_5_8
> Additional hard class defined as: sunos_sun4u
> Additional hard class defined as: sunos_sun4u_5_8
> Additional hard class defined as: sparc
> ...
>
> # on a 2.6 host
> cfagent --verbose --no-splay -p
>
> ...
> Additional hard class defined as: 32_bit
> Additional hard class defined as: sunos_5_6
> Additional hard class defined as: sunos_sun4u
> Additional hard class defined as: sunos_sun4u_5_6
> Additional hard class defined as: sparc
> ...
>
> I'm missing something. You can't use these, or you don't like the
> format?
>
>
> -----Original Message-----
> From: Ferguson, Steve [mailto:Steve.Ferguson@gedas.com]
> Sent: Monday, September 08, 2003 12:28 PM
> To: Cfengine List (E-mail)
> Subject: Platform string
>
> 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
>
> Cfengine has arch, class, and ostype. Of these, class and
> ostype can't
> differentiate Solaris 7 from Solaris 8 (class is sun4, ostype
> is sun4u).
> arch can differentiate, but it further differentiates kernel patch
> levels.
> I want all Solaris 7 boxes grouped in one definition.
>
> My end result is for binary updates. For various reasons, I have to
> maintain separate binaries for Solaris 2.6, 7, and 8. Right
> now I have
> a
> mass of symlinks in my repository that I'd like to clean up.
> Is there a
> way
> I can define a variable in the control section based on a
> shell escape?
>
> What's "The Cfengine Way" for accomplishing this? I'm open to other
> approaches, so long as they meet the basic functionality of
> differentiating
> major releases (and no more granular than that) of a single OS.
>
> Steve
>
> --
> Steve Ferguson <steve.ferguson@gedas.com>
> gedas USA, Inc.
> Phone: 248-754-3844
> URL: http://www.gedasusa.com
>
>
>
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-cfengine
>
- Platform string, Ferguson, Steve, 2003/09/08
- RE: Platform string, Ferguson, Steve, 2003/09/08
- RE: Platform string, Wheeler, John, 2003/09/08
- RE: Platform string,
Ferguson, Steve <=
- RE: Platform string, Wheeler, John, 2003/09/08
- RE: Platform string, Ferguson, Steve, 2003/09/09