www.delorie.com/gnu/docs/cfengine/cfengine-Tutorial_21.html   search  
Buy GNU books!

GNU cfengine

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.7 CFINPUTS environment variable

Whenever cfengine looks for a file it asks a question: is the filename an absolute name (that is a name which begins from `/' like /usr/file), is it a file in the directory in which you invoke cfengine or is it a file which should be searched for in a special place?

If you use an absolute filename either on the command line using -f or in the import section of your program (a name which begins with a slash '/'), then cfengine trusts the name of the file you have given and treats it literally. If you specify the name of the file as simple `.' or `-' then cfengine reads its input from the standard input.

If you run cfengine without arguments (so that the default filename is `cfagent.conf') or you specify a file without a leading slash in the import section, then the value of the environment variable CFINPUTS is prepended to the start of the file name. This allows you to keep your configuration in a standard place, pointed to by CFINPUTS. For example:

host# setenv CFINPUTS /usr/local/masterfiles/cfengine/inputs

host# cfagent -f myfile

In this example, cfengine tries to open `/usr/local/masterfiles/cfengine/inputs/myfile'. If no value is set for CFINPUTS, then the default location is the trusted cfengine directory `/var/cfengine/inputs'.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003