Custom.conf - Customize configuration file
/custom/etc/custom.conf
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.
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 { set DNS_DOMAIN test.com }
Example:
Net 10.5.0.0/16 { set DNS_SERVERS 10.5.1.1:10.1.1.1 }
Example:
Define ws_sol8 { include ws }
There are five different parameters which can be used when makeing profiles. These are set, hash, include, public, and package declarations.
set PATCHCLASS ws_cde
This will create the variable PATCHCLASS with the value ws_cde.
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.
This can be done multiple times in the same Define or Net.
# /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.
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
Written by Daniel Bergström and Joacim Häggmark