blob: 95723c4ee1216f520ac6939a0fe18798ea17c224 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
my $input;
my $group;
my $auth = "";
my $tls = "";
my $metadata = "";
while( $input = <STDIN> )
{
chop $input;
if( $input =~ /^\[.*\]$/ )
{
if( $metadata )
{
print "[$group]\n";
print "metadata=$metadata\n";
$metadata="";
}
if( $input =~ /^\[(korn-(\d+)-\d+)\]$/ )
{
$group = $1;
}
else
{
$group = "";
}
$auth="";
$tls="";
}
if( $input =~ /^auth\=(.*)/ )
{
$metadata=$tls ? "auth=$1,tls=$tls" : "auth=$1";
$auth=$1;
print "# DELETE [$group]auth\n";
}
elsif( $input =~ /^tls\=(.*)/ )
{
$metadata=$auth ? "auth=$auth,tls=$1" : "tls=$1";
$tls=$1;
print "# DELETE [$tls]tls\n";
}
}
|