summaryrefslogtreecommitdiff
path: root/fml/utils/bin/show_config.pl
blob: 2ba30737ef364eab31c1d274dbb9583c3cd0c252 (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
44
45
46
#!/usr/bin/env perl
#
# $FML$
#

use strict;
use Carp;
use Getopt::Long;
my %option = ();

GetOptions(\%option, qw(debug! d! sgml! html! type=s));

$/ = "\n\n";

my $mode = $option{ sgml } ? 'sgml' : 'html';
my $type = $option{ type } || '';

pre($mode);

while (<>) {
    if ($type eq 'filter_rules') {
	print if /filter/o && not /ldap/o;
    }

    if ($type eq 'filter_size') {
	print if /size/o;
    }
}

post($mode);

exit 0;


sub pre
{
    print "<para>\n";
    print "<screen>\n";
}


sub post
{
    print "</screen>\n";
    print "</para>\n";
}