This file is indexed.

config is in smb2www 980804-41.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/usr/bin/perl -w

my $config_file     = '/etc/smb2www/smb2www.conf';
my $master_browser  = '#MBROWSE#';
my $language        = '#LANGUAGE#';
my $enabled         = '#ENABLED#';
my $need_rec        = 0;
my @languages       = ( 'english', 
                        'czech', 
                        'dutch', 
                        'finnish', 
                        'french', 
                        'polish', 
                        'spanish', 
                        'swedish',
                        'vietnamese' );

use Debconf::Client::ConfModule qw(:all);

if (open CFG, "<$config_file")
{
    my $re_lang = join('|', @languages);
    while (<CFG>)
    {
        $master_browser=$1 if /^masterbrowser\s*=\s*(\S+)/;
        $enabled=$1 if /^enabled\s*=\s*(\S+)/;
        $language= ucfirst $1 if /^language\s*=\s*($re_lang)\s*/o;
        $need_rec=1 if m|^key\s*=\s*#KEY#|;
    }
    close CFG;
}   

version('2.0');

# check if debconf supports seen flag
capb('backup');

# title('SMB2WWW Configuration');

set('smb2www/master_browser', $master_browser) 
            if ($master_browser ne '#MBROWSE#');

set('smb2www/language', $language)
            if ($language ne '#LANGUAGE#');

set('smb2www/set_link', ("$enabled" eq "yes") ? 'true' : 'false');

my $state = $next = 1;
while ($state > 0 && $state < 3)
{
    if ($state == 1)
    {
        beginblock();
        input('high', 'smb2www/security');
        input('medium', 'smb2www/set_link');
        endblock();
    }
    elsif ($state == 2)
    {
        beginblock();
        input('medium', 'smb2www/master_browser');
        input('medium', 'smb2www/language');
        endblock();
    }
    else
    {
        die ('Unknown state!');
    }

    $next = (((go())[0]) == 30) ? -1 : +1;
    $state += $next;
}


if (($need_rec)
   or (get('smb2www/master_browser') ne $master_browser)
   or (get('smb2www/language') ne $language)
   or (get('smb2www/set_link') ne $enabled))
{
    set('smb2www/need_reconfigure', 'true');
}
else
{
    set('smb2www/need_reconfigure', 'false');
}


# vim: et ts=4