Rozdiely pre iotta/iotta.pl medzi verziami 1.2 a 1.3
verzia 1.2, 2003/03/23 11:29:52 |
verzia 1.3, 2003/03/30 11:33:59 |
|
|
#!/usr/bin/perl |
#!/usr/bin/perl |
require Iotta::Ctrl; |
require Iotta::Ctrl; |
use strict; |
use strict; |
|
use Getopt::Long; |
|
|
my (%cfg); |
my (%cfg); |
|
|
|
|
#} |
#} |
|
|
sub init_conf { |
sub init_conf { |
my ($conf, $key, $val, $fname); |
my @confs; |
|
my ($conf, $key, $val, @fname); |
|
|
$fname = shift; |
&Getopt::Long::Configure ("pass_through"); |
$fname = "iotta.cf" unless $fname; |
&GetOptions ("conf=s" => \@confs, "conffile=s" => \@fname); |
print STDERR "loading configuration file $fname...\n"; |
$conf = join ("\n", @confs); |
|
|
open (CF, $fname) || die "couldn't open configuration file $fname\n"; |
for my $fname (@fname) { |
while (<CF>) { $conf .= $_; }; |
$fname = "iotta.cf" unless $fname; |
close CF; |
print STDERR "loading configuration file $fname...\n"; |
|
|
|
open (CF, $fname); #|| die "couldn't open configuration file $fname\n"; |
|
while (<CF>) { $conf .= $_; }; |
|
close CF; |
|
} |
|
|
$conf =~ s/^#.*//; |
$conf =~ s/^#.*//; |
|
|
Platon Group <platon@platon.sk> http://platon.sk/
|
|