Environment variables in pathnames

If you want to use environment variables in file name PATH on UNIX (commonly known as parameterized checks\), it is best to define those environment variables under the following file and directory: etc/opt/opsware/snapshot/env. Be sure that you do not use /etc/profile to source environment variables on UNIX.

To define environment variables that can be sourced for the File rule configuration, you can create a file with the variables on the managed server you want to audit or snapshot.

Example

  1. ssh to the managed server that you want to audit or snapshot.
  2. Create a new directory in the following location:

    mkdir /etc/opt/opsware/snapshot
  3. Create a new empty file, such as:

    touch /etc/opt/opsware/snapshot/env
  4. Define the environment variables you want to source from the file rule by entering them in the new file.

    Example:

    TEST1='/tmp/test1'
    TEST2='/home/test2'
    export TEST1 TEST2
  5. When you have finished editing, save the file.