File: config

package info (click to toggle)
isoqlog 2.2-0.6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,252 kB
  • ctags: 197
  • sloc: sh: 3,503; ansic: 3,485; makefile: 249; perl: 58
file content (74 lines) | stat: -rw-r--r-- 1,707 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/perl -w
# -*-CPerl-*-
# Script to configure Isoqlog.

use Debconf::Client::ConfModule ':all';
my $version = version(2.0);
capb("backup");
title("Isoqlog Configuration");

# begin configuration script
my $topstate;
my $back;
my $noninteractive;

$topstate = "start";

## Ornek (non-interaktif kullanim icin)
##$noninteractive = (((input("high", "isoqlog/main_logtype"))[0]) == 30);

while ($topstate ne "done") {
    if ($topstate eq "start") {
	$noninteractive = (((input("high", "isoqlog/main_logtype"))[0]) == 30);
	if (!$noninteractive) {
	    go();
	}
	$topstate = "outputdir";
    }

    if ($topstate eq "outputdir") {
	$noninteractive = (((input("high", "isoqlog/main_outputdir"))[0]) == 30);
	if (!$noninteractive) {
	    go();
	}
	$topstate = "hostname";
    }

    if ($topstate eq "hostname") {
	$hostname = `hostname --fqdn` || "localdomain";
	chomp($hostname);
	set("isoqlog/main_hostname", $hostname);
	$noninteractive = (((input("high", "isoqlog/main_hostname"))[0]) == 30);
	if (!$noninteractive) {
	    go();
	}
	$topstate = "langfile";
    }

    if ($topstate eq "langfile") {
	$noninteractive = (((input("high", "isoqlog/main_langfile"))[0]) == 30);
	if (!$noninteractive) {
	    go();
	    $lang = get("isoqlog/main_langfile");
	    $lang = lcfirst($lang);
	    set("isoqlog/main_langfile", $lang);
	}
	$topstate = "domains";
    }

    if ($topstate eq "domains") {
	$noninteractive = (((input("high", "isoqlog/main_domains"))[0]) == 30);
	if (!$noninteractive) {
	    go();
	    $domains = get("isoqlog/main_domains");
	    if ($domains =~ m/\,/) {
		$topstate = "domains";
	    } else {
		$topstate = "done";
	    }
	} else {
	    $topstate = "done";
	}
    }
} ## while