checks that the config file passed in parameter exist, otherwise, uses the default one (/etc/koha.conf)
useful in upgradedb2marc.pl script. * if this script is called during installation, uses /etc/koha.conf.tmp * if it's called manually (after installation), uses /etc/koha.conf, as the tmp file is no more here :-)
This commit is contained in:
parent
88034fbccb
commit
40d6ddb383
|
|
@ -169,6 +169,8 @@ sub new
|
|||
my $conf_fname = shift; # Config file to load
|
||||
my $self = {};
|
||||
|
||||
# check that the specified config file exists
|
||||
undef $conf_fname unless (-e $conf_fname);
|
||||
# Figure out a good config file to load if none was specified.
|
||||
if (!defined($conf_fname))
|
||||
{
|
||||
|
|
@ -177,7 +179,6 @@ sub new
|
|||
$conf_fname = $ENV{"KOHA_CONF"} ||
|
||||
CONFIG_FNAME;
|
||||
}
|
||||
|
||||
$self->{"config_file"} = $conf_fname;
|
||||
|
||||
# Load the desired config file.
|
||||
|
|
|
|||
Loading…
Reference in New Issue