19 |
my $config; |
my $config; |
20 |
|
|
21 |
use index_DBI; # there is no other, right now ;-) |
use index_DBI; # there is no other, right now ;-) |
22 |
|
my $index; |
|
my $index = new index_DBI(); # open index |
|
23 |
|
|
24 |
my %opts; |
my %opts; |
25 |
|
|
213 |
|
|
214 |
my $cfg = new Config::IniFiles( -file => $config_file ); |
my $cfg = new Config::IniFiles( -file => $config_file ); |
215 |
|
|
216 |
|
# open index |
217 |
|
$index = new index_DBI( |
218 |
|
$cfg->val('global', 'dbi_dbd'), |
219 |
|
$cfg->val('global', 'dbi_dsn'), |
220 |
|
$cfg->val('global', 'dbi_user'), |
221 |
|
$cfg->val('global', 'dbi_passwd') || '', |
222 |
|
); |
223 |
|
|
224 |
|
# delete [global] section to leave just databases sections |
225 |
|
$cfg->DeleteSection('global'); |
226 |
|
|
227 |
foreach my $database ($cfg->Sections) { |
foreach my $database ($cfg->Sections) { |
228 |
|
|
229 |
my $isis_db = $cfg -> val($database, 'isis_db') || die "$database doesn't have 'isis_db' defined!"; |
my $isis_db = $cfg -> val($database, 'isis_db') || die "$database doesn't have 'isis_db' defined!"; |