help-cfengine
[Top][All Lists]
Advanced

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

ostype variable


From: Patrice GUERLAIS
Subject: ostype variable
Date: Tue, 3 Apr 2001 17:45:35 +0200

Hi all,

I know how to do an 'if' within a cfengine script, using classes, for example 
using os type classes (redhat, solaris, debian, ...).
But is there a variable containing the os type value ? something which could be 
used like in :

<cut>
copy:
${source_dir}/${OSTYPE_CFENGINE_INTERNAL_VARIABLE}
        dest=${dest_dir}
        ...
</cut>

With such a variable, I can deal with a set of files structured with a sub-dir 
for each OS I use and avoid writing things like the
following, for which I must add the new files in the tree _and_ modify the 
script each time I use a new OS.
<cut>
# Give a value to an ostype variable
redhat::
        ostype = ( redhat )
solaris::
        ostype = ( solaris )
...

# and now use that variable
copy:
        ${source_dir}/${ostype}
                dest=${dest_dir}
                ...
</cut>

Thanks for your help

Patrice




reply via email to

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