NAME

Custom.conf - Customize configuration file


SYNOPSIS

/custom/etc/custom.conf


DESCRIPTION

To be able to use Customize must you have at least one profile. There are different ways to create a profile. Profiles can be from just a few lines to inheriting settings from other profiles.

There are two files for the configuration, one in which the definitions of the profiles is and another with which host to use what profile. The definitions is stored in /custom/etc/custom.conf and the host list is stored in /custom/etc/host.conf.

Types

There are three different types which can setup the environment, Global, Net and Define. These types can be combined to create an easy to maintain environment. They can all setup variables and packets to be installed.

First of all Global is parsed, then Net and finally the Define that is specified in host.conf. If more then one Net matches the ip it's undefined in which order they will be parsed. If a variable or a script is set twice the setting that is parsed last will be used.i So Net will override settings in Global and the Define will override both Global and Net.

Global
The settings set in this will be the default value for all profiles. An example:
        Global {
                set DNS_DOMAIN test.com
        }

Net
If a network, or a part of a network needs special options can this be used to add those settings. The values will be added as global values for the hosts on those networks.

Example:

        Net 10.5.0.0/16 {
                set DNS_SERVERS 10.5.1.1:10.1.1.1
        }

Define
There need to be atleast one Define specified, this is needed for binding a hostname in the host configuration file. The Defines can inherit other defines to make it easier to maintain.

Example:

        Define ws_sol8 {
                include ws
        }

Parameters

There are five different parameters which can be used when makeing profiles. These are set, hash, include, public, and package declarations.

set
This create an variable with a value. An example on how a set is written:
        set PATCHCLASS ws_cde

This will create the variable PATCHCLASS with the value ws_cde.

hash
Creates a list of variables with values. An example on how a hash is written: hash NIS_SERVERS_IP { nis-1.somewhere.net 10.0.0.42 nis-2.somewhere.net 10.0.2.42 }

This creates a hash named NIS_SERVERS_IP, between the two { .. } is the variables written as if they where the set parameter, only set infront is left out.

include
Includes a Define into the current Define or Net. To include the Define std into another Define you will only need to write include std

This can be done multiple times in the same Define or Net.

public
Flags that this is a public Define. To specify what profiles are public to be used you can flag it in the Define. If a Define has public set it will be listed when
    # /custom/bin/custom.pl -l

is executed. In the define you only need to write

    public

If a public Define is included into a Define without public, this will not make the non-public Define public. This is useful if you only want the most usual types to be printed if host.conf is edited by a script or so. If you want to see all defines you can run custom.pl with the -la option.

package
The avalible packets may differ from Customize installations, The base directory for all scripts is /custom/scripts, below this is sub directories as Global, or any site specefic. In these directories the Customize perl modules will be placed. If we look in the Global directory we can find a file named config_nis_client.pm. If we wish to use this module in the configuration we can include it by giving it a priority number and the name, this is done by writting
    20 Global::config_nis_client

where the 20 is the priority number, Global is the sub directory to /custom/scripts and config_nis_client is the filename where the .pm is left out.

If we want to stop a package from being run (if it's defined in an earlier place) we can doing it the same way as including a package but instead of giving it a priority value we put a minus (-) sign there. - Global::config_nis_client


AUTHOR

Written by Daniel Bergström and Joacim Häggmark