Config(3)

NAME
Net::DNS::SEC::Maint::Config - Module used in DNSSEC Maintenance shell.

DESCRIPTION
This class is used to get and set configuration paramaters.

CLASS METHODS

  new

  read_config_file
Overwrites the default configuration paramaters by using reading the config file. Normally you would use the following secuence.
    my $config=Net::DNS::SEC::Maint::Config->new();
    $config->set_default_conf;
    $config->read_config_file;

  makeconfig
  use Net::DNS::SEC::Maint::Config;
  Net::DNS::SEC::Maint::Config->makeconfig;

This method can be used to create a configuration file. It will open a terminal start asking the values for all configuration parameters, giving current details. The method comes in handy at installation time and should be used sparely.

The configfile contains lines with 'parameter=value' pairs. Trailing and leading spaces are ignored.

All tokens on a line behind and including a '#' sign are considdered comments

OBJECT METHODS

  setconf
    $config->setconf("parameter","value");
    $config->setconf("parameter","value","description");

This method creates an entry in the parameter table and sets the (default value) to "value". An optional 3rd paramater will be used for the discription.

  setdescription getdescription
    $config->setdescription("parameter","description");
    $description=$config->getdescription("parameter");

This method sets or gets a discription of a particular paramater.

  set_default_conf
    $config->set_default_conf;

Sets all default parameters as specified in the code.

  getconf
    $value=$config->getconf("parameter");

Returns the parameter value.

The actual vallue of the paramater is read from from a configuration file specified in the DNSSECMAINT_CONFFILE configuration variable. If that variable is not set or the file specified therein can not be read than the parameters are read from the file called '/etc/dnsmaint.conf'.

If a configuration file cannot be found than the defaults are used, these are hard-coded in the perl sources.

If a parameter has been specified using a environment variable of the form DNSSECMAINT_<PARAMNAME> then that value has precedence over the value as specified in the configuration file or the defaults.

In the configuration file the first entry on a line is taken as the parameter name, the rest of the line is interpreted as parameter value. Empty lines are ignored text between a pound sign '#' and a new-line are interpreted as comment.

PARAMAETER AND DEFAULT VALUES
All these parameters are set during 'set_default_conf'.

  logdir ( DNSSECMAINT_LOGDIR )
Full path to the directory where log files are stored.

  logdir ( DNSSECMAINT_TMPDIR )
Full path to the directory where temporary files are stored. Note that these files may be large e.g (signed) zone files.

  group ( DNSSECMAINT_MAINTGROUP )
The name of the group that may access the key database. Defaults to 'dnssecmt'