Debian Codegraph @

debian/config

raw
1 #!/usr/bin/perl -w
2 # -*-CPerl-*-
3 # Script to configure Isoqlog.
4
5 use Debconf::Client::ConfModule ':all';
6 my $version = version(2.0);
7 capb("backup");
8 title("Isoqlog Configuration");
9
10 # begin configuration script
11 my $topstate;
12 my $back;
13 my $noninteractive;
14
15 $topstate = "start";
16
17 ## Ornek (non-interaktif kullanim icin)
18 ##$noninteractive = (((input("high", "isoqlog/main_logtype"))[0]) == 30);
19
20 while ($topstate ne "done") {
21 if ($topstate eq "start") {
22 $noninteractive = (((input("high", "isoqlog/main_logtype"))[0]) == 30);
23 if (!$noninteractive) {
24 go();
25 }
26 $topstate = "outputdir";
27 }
28
29 if ($topstate eq "outputdir") {
30 $noninteractive = (((input("high", "isoqlog/main_outputdir"))[0]) == 30);
31 if (!$noninteractive) {
32 go();
33 }
34 $topstate = "hostname";
35 }
36
37 if ($topstate eq "hostname") {
38 $hostname = `hostname --fqdn` || "localdomain";
39 chomp($hostname);
40 set("isoqlog/main_hostname", $hostname);
41 $noninteractive = (((input("high", "isoqlog/main_hostname"))[0]) == 30);
42 if (!$noninteractive) {
43 go();
44 }
45 $topstate = "langfile";
46 }
47
48 if ($topstate eq "langfile") {
49 $noninteractive = (((input("high", "isoqlog/main_langfile"))[0]) == 30);
50 if (!$noninteractive) {
51 go();
52 }
53 $topstate = "domains";
54 }
55
56 if ($topstate eq "domains") {
57 $noninteractive = (((input("high", "isoqlog/main_domains"))[0]) == 30);
58 if (!$noninteractive) {
59 go();
60 $domains = get("isoqlog/main_domains");
61 if ($domains =~ m/\,/) {
62 $topstate = "domains";
63 } else {
64 $topstate = "done";
65 }
66 } else {
67 $topstate = "done";
68 }
69 }
70 } ## while
71