2014-07-25 Junichi Satoh <junichi@rworks.jp>

* util/pandora_db.pl: Fixed error when 'dbengine' token is not defined
	in pandora_server.conf with enterprise installed.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10355 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
jsatoh 2014-07-25 03:47:55 +00:00
parent d11b4d0cb3
commit b4992dcbc5
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2014-07-25 Junichi Satoh <junichi@rworks.jp>
* util/pandora_db.pl: Fixed error when 'dbengine' token is not defined
in pandora_server.conf with enterprise installed.
2014-07-23 Miguel de Dios <miguel.dedios@artica.es> 2014-07-23 Miguel de Dios <miguel.dedios@artica.es>
* util/plugin/snmp_remote.pl: some fixed for the snmp v3. * util/plugin/snmp_remote.pl: some fixed for the snmp v3.

View File

@ -547,7 +547,9 @@ sub pandora_load_config ($) {
foreach my $param ('dbuser', 'dbpass', 'dbname', 'dbhost', 'log_file') { foreach my $param ('dbuser', 'dbpass', 'dbname', 'dbhost', 'log_file') {
die ("[ERROR] Bad config values. Make sure " . $conf->{'_pandora_path'} . " is a valid config file.\n\n") unless defined ($conf->{$param}); die ("[ERROR] Bad config values. Make sure " . $conf->{'_pandora_path'} . " is a valid config file.\n\n") unless defined ($conf->{$param});
} }
$conf->{'dbengine'} = 'mysql' unless defined ($conf->{'dbengine'});
$conf->{'dbport'} = '3306' unless defined ($conf->{'dbport'}); $conf->{'dbport'} = '3306' unless defined ($conf->{'dbport'});
$conf->{'claim_back_snmp_modules'} = '1' unless defined ($conf->{'claim_back_snmp_modules'});
# Read additional tokens from the DB # Read additional tokens from the DB
my $dbh = db_connect ('mysql', $conf->{'dbname'}, $conf->{'dbhost'}, $conf->{'dbport'}, $conf->{'dbuser'}, $conf->{'dbpass'}); my $dbh = db_connect ('mysql', $conf->{'dbname'}, $conf->{'dbhost'}, $conf->{'dbport'}, $conf->{'dbuser'}, $conf->{'dbpass'});