~ubuntu-branches/ubuntu/warty/moodle/warty

« back to all changes in this revision

Viewing changes to debian/config

  • Committer: Bazaar Package Importer
  • Author(s): Isaac Clerencia
  • Date: 2004-06-04 23:45:37 UTC
  • Revision ID: james.westby@ubuntu.com-20040604234537-goh5inrjic0uo3d6
Tags: 1.3.1-1
* New upstream release, closes: #252693
* Added "exec 0<&1" to postinst to fix hang when ucf asks the user

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
 
 
3
# Source debconf library.
 
4
. /usr/share/debconf/confmodule
 
5
 
 
6
db_version 2.0
 
7
db_capb backup
 
8
 
 
9
db_input high moodle/sgbd || true
 
10
 
 
11
STATE=1
 
12
while [ "$STATE"  != 0 -a "$STATE" != 13 ]
 
13
  do
 
14
  case "$STATE" in
 
15
      1)
 
16
          db_input critical moodle/webserver || true
 
17
          if db_go; then
 
18
              db_get moodle/webserver || true
 
19
              if [ ! -z "$RET" ]; then
 
20
                  STATE=2
 
21
              fi
 
22
          else
 
23
              STATE=0
 
24
          fi
 
25
          ;;
 
26
 
 
27
      2)
 
28
          db_input critical moodle/db_server || true
 
29
          if db_go; then
 
30
              db_get moodle/db_server || true
 
31
              if [ ! -z "$RET" ]; then
 
32
                  STATE=3
 
33
              fi
 
34
          else
 
35
              STATE=1
 
36
          fi
 
37
          ;;
 
38
 
 
39
      3)
 
40
          db_input critical moodle/db_host || true
 
41
          if db_go; then
 
42
              db_get moodle/db_host || true
 
43
              if [ ! -z "$RET" ]; then
 
44
                  STATE=4
 
45
              fi
 
46
          else
 
47
              STATE=2
 
48
          fi
 
49
          ;;
 
50
 
 
51
      4)
 
52
          db_input critical moodle/dba_name || true
 
53
          if db_go; then
 
54
              db_get moodle/dba_name || true
 
55
              if [ ! -z "$RET" ]; then
 
56
                  STATE=5
 
57
              fi
 
58
          else
 
59
              STATE=2
 
60
          fi
 
61
          ;;
 
62
 
 
63
      5)
 
64
          db_input critical moodle/dba_password || true
 
65
          if db_go; then
 
66
              db_get moodle/dba_password || true
 
67
              STATE=6
 
68
          else
 
69
              STATE=4
 
70
          fi
 
71
          ;;
 
72
 
 
73
      6)
 
74
          db_input critical moodle/dba_confirm || true
 
75
          if db_go; then
 
76
              db_get moodle/dba_confirm || true
 
77
              CONFIRM="$RET"
 
78
              db_get moodle/dba_password || true
 
79
              if [ "$RET" != "$CONFIRM" ]; then
 
80
                  STATE=7
 
81
              else
 
82
                  STATE=8
 
83
              fi
 
84
          else
 
85
              STATE=3
 
86
          fi
 
87
          ;;
 
88
 
 
89
      7)
 
90
          db_input critical moodle/mismatch || true
 
91
          db_go
 
92
          STATE=4
 
93
          ;;
 
94
 
 
95
      8)
 
96
          db_input critical moodle/dbu_name || true
 
97
          if db_go; then
 
98
              db_get moodle/dbu_name || true
 
99
              if [ ! -z "$RET" ]; then
 
100
                  STATE=9
 
101
              fi
 
102
          else
 
103
              STATE=2
 
104
          fi
 
105
          ;;
 
106
 
 
107
      9)
 
108
          db_input critical moodle/dbu_password || true
 
109
          if db_go; then
 
110
              db_get moodle/dbu_password || true
 
111
              STATE=10
 
112
          else
 
113
              STATE=8
 
114
          fi
 
115
          ;;
 
116
 
 
117
      10)
 
118
          db_input critical moodle/dbu_confirm || true
 
119
          if db_go; then
 
120
              db_get moodle/dbu_confirm || true
 
121
              CONFIRM="$RET"
 
122
              db_get moodle/dbu_password || true
 
123
              if [ "$RET" != "$CONFIRM" ]; then
 
124
                  STATE=11
 
125
              else
 
126
                  STATE=12
 
127
              fi
 
128
          else
 
129
              STATE=8
 
130
          fi
 
131
          ;;
 
132
 
 
133
      11)
 
134
          db_input critical moodle/mismatch || true
 
135
          db_go
 
136
          STATE=8
 
137
          ;;
 
138
 
 
139
      12)
 
140
          db_input critical moodle/create_tables || true
 
141
          db_go
 
142
          STATE=13
 
143
          ;;
 
144
  esac
 
145
done
 
146
 
 
147
if [ "$STATE" = 0 ]; then
 
148
    db_input critical moodle/notconfigured || true
 
149
    db_go
 
150
    exit 1
 
151
fi