help-cfengine
[Top][All Lists]
Advanced

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

Re: Help in Setting variables via class types


From: Mark . Burgess
Subject: Re: Help in Setting variables via class types
Date: Mon, 26 May 2003 17:41:22 +0200 (MEST)


Straifghtfowardly:

control:

 solaris::

    OLDROOT     = ( "exec /bin/sh -c `/usr/bin/grep root /etc/shadow`" )
    NEWROOT     = ( "exec /bin/sh -c `/usr/bin/grep root 
/net/HOST/Files/etc/shadow`" ) 

 aix::

    OLDROOT     = ( "exec /usr/bin/perl `/root/aixpasswd.pl root`")
    NEWROOT     = ( "exec /bin/sh -c `/usr/bin/grep root 
/net/HOST/Files/etc/shadow `" )
 
 any::
 
    ....

editfiles:

  { /bla/myfile

  AppendIfNoSuchLine "bla bla $(OLDROOT) or $(NEWROOT)"
  }

M

On 26 May, Garrett, Matt M SITI-ITDIEEE wrote:
> Folks
> 
> What I would like to do is to set some variables
> depending on the system class type e.g
> 
> Solaris
> aix
> 
> To set these variables for Solaris
>   OLDROOT     = ( "exec /bin/sh -c `/usr/bin/grep root /etc/shadow`" )
>   NEWROOT     = ( "exec /bin/sh -c `/usr/bin/grep root 
> /net/HOST/Files/etc/shadow`" ) 
>  
> To set these variable for AIX
>   OLDROOT     = ( "exec /usr/bin/perl `/root/aixpasswd.pl root`")
>   NEWROOT     = ( "exec /bin/sh -c `/usr/bin/grep root 
> /net/HOST/Files/etc/shadow `" )
> 
> Then to use these variables in a EditFiles section.
> 
> I am sure it must be possible , but every thing I try just does not seem to 
> work.
> I had thought about using a "include" but the variables don't get given to 
> the calling parent .
> 
> Any idea's
> 
> Thanks
> 
> Matt
> 
> Matthew Garrett
> Unix System Support
> Shell Information Technology International Limited
> Seafield House, North Anderson Drive, Aberdeen AB15 6GZ, United Kingdom
> 
> Tel: +44 (0)1224 81 8373 Other Tel: Internal 630 8373
> Email: Matt.M.Garrett@is.shell.com
> Internet: http://www.shell.com
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-cfengine



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  Mark.Burgess@iu.hio.no
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

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