NAME

Logrep::Config - Process & maintain logrep configuration


SYNOPSIS

    use Logrep::Config;
    LoadConfigFile ("logrep.conf");
    my $logsfile = ExpandParVal ($lclient, "snapshot_server_logfile");
    my $webdir = ExpandParVal ($lclient, "snapshot_server_webpath");
    MakePathAvailable ($logsfile);      # Make server path available if necessary
    MakePathAvailable ($webdir);        # Make logrep report path available if necessary


DESCRIPTION

This module allows processing and maintenance of configuration information for logrep programs. It automatically initializes a configuration context and can load settings from a configuration file. Settings from a file are automatically used to update elements like system defaults, client types, clients and favorite sets. Logrep::Config supports parameter expansion and comes with some handy routines for that purpose.

LoadConfigFile (FILENAME)
Updates logrep configuration with settings from a configuration file. If no file is given, LoadConfigFile tries to use file logrep.conf in the same directory as the module itself, or the file name specified with switches -f or --configfile in the command line.

ExpandParVal (HASHNAME, PARAMETER)
Expands pseudo values in PARAMETER defined in the hash HASHNAME.

Following pseudo values are supported:

$COUNT - snapshot_count value for a client
$LOGFILE - logfile value for a client
$LOGREPHOME - Logrep home directory
$CLIENT - Client name
$YYYY - 4-digit year
$MM - 2-digit month number
$DD - 2-digit day number
MakePathAvailable (PATH)
Makes sure that PATH physically exist by creating all directories within the path.