10 |
my %omni; |
my %omni; |
11 |
|
|
12 |
sub db { |
sub db { |
13 |
|
return if (scalar keys %omni != 6); |
14 |
|
|
15 |
my $rv = $dbh->do("update gantt |
my $rv = $dbh->do("update gantt |
16 |
set finish=now() where |
set finish=now() where |
17 |
sessionid='$omni{SessionID}' and |
sessionid='$omni{SessionID}' and |
18 |
type='$omni{Session_type}' and |
type='$omni{Session_type}' and |
19 |
status='$omni{Session_status}' and |
status='$omni{Session_status}' and |
20 |
user_group_host='".$omni{'User.Group@Host'}."' and |
user_group_host='".$omni{'User.Group@Host'}||''."' and |
21 |
specification='$omni{Backup_Specification}'"); |
specification='$omni{Backup_Specification}'"); |
22 |
|
|
23 |
print "rv: $rv\n" if ($debug); |
print "rv: $rv\n" if ($debug); |
34 |
while(<O>) { |
while(<O>) { |
35 |
chomp; |
chomp; |
36 |
if (/^$/) { |
if (/^$/) { |
37 |
db() if (scalar keys %omni == 6); |
db(); |
38 |
%omni = (); |
%omni = (); |
39 |
print "------------\n" if ($debug); |
print "------------\n" if ($debug); |
40 |
next; |
next; |
41 |
} |
} |
42 |
s/^[\t\s]+//; |
s/^[\t\s]+//; |
43 |
my ($l,$r) = split (/\s*:\s*/,$_,2); |
my ($l,$r) = split (/\s*:\s*/,$_,2); |
44 |
$l =~ s/\s+/_/g; |
if ($r) { |
45 |
$r =~ s/\s+$//g; |
$l =~ s/\s+/_/g; |
46 |
print "$l -> $r\n" if ($debug); |
$r =~ s/\s+$//g; |
47 |
$omni{$l} = $r; |
print "$l -> $r\n" if ($debug); |
48 |
|
$omni{$l} = $r; |
49 |
|
} |
50 |
} |
} |
51 |
db(); |
db(); |
52 |
close(O); |
close(O); |