~ubuntu-branches/debian/squeeze/sympa/squeeze

« back to all changes in this revision

Viewing changes to debian/config

  • Committer: Bazaar Package Importer
  • Author(s): Christian Perrier
  • Date: 2007-01-20 18:09:28 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070120180928-0e42mbwg87mlo44y
Tags: 5.2.3-1.2
* Non-maintainer upload to re-fix l10n issues
* As debconf-updatepo was not run in previous versions, the French
  translation was outdated. Hence fix it.
* Remove several duplicate spaces in the debconf templates

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
    db_reset sympa/db_passwd_again
23
23
fi
24
24
 
 
25
# Language selection
 
26
# - currently supported languages
 
27
possible_langs="de cs el es et_EE en_US fr hu it ja_JP nl oc pt_BR sv tr"
 
28
supported_langs=""
 
29
locales=`locale -a`
 
30
 
 
31
for lang in $possible_langs; do
 
32
        if locale -a | grep $lang >/dev/null; then
 
33
                if [ -z "$supported_langs" ]; then
 
34
                        supported_langs=$lang
 
35
                else
 
36
                        supported_langs="$supported_langs, $lang"
 
37
                fi
 
38
        fi
 
39
done
 
40
 
25
41
# Get the language value in case of a manual change
26
42
conf='/etc/sympa/sympa.conf'
27
43
if [ -f /etc/sympa/sympa.conf ]; then
28
44
    lang=`perl -nle 'if (/^\s*lang\s+(\w+)/) {print $1;}' $conf`
29
 
    case $lang in
30
 
        "cn-big5" | "tw")
31
 
            lang="Traditional Chinese"
32
 
            ;;
33
 
        "cn-gb" | "cn")
34
 
            lang="Simplified Chinese"
35
 
            ;;
36
 
        "cz")
37
 
            lang="Czech"
38
 
            ;;
39
 
        "us")
40
 
            lang="English"
41
 
            ;;
42
 
        "et")
43
 
            lang="Estonian"
44
 
            ;;
45
 
        "fi")
46
 
            lang="Finnish"
47
 
            ;;
48
 
        "fr")
49
 
            lang="French"
50
 
            ;;
51
 
        "de")
52
 
            lang="German"
53
 
            ;;
54
 
        "hu")
55
 
            lang="Hungarian"
56
 
            ;;
57
 
        "it")
58
 
            lang="Italian"
59
 
            ;;
60
 
        "pl")
61
 
            lang="Polish"
62
 
            ;;
63
 
        "ro")
64
 
            lang="Romanian"
65
 
            ;;
66
 
        "es")
67
 
            lang="Spanish"
68
 
            ;;
69
 
        *)
70
 
            lang="English"
71
 
    esac
72
45
    db_set sympa/language "$lang"
73
46
 
74
47
    # Get the hostname.
122
95
 
123
96
 
124
97
# Ask for language
 
98
db_subst sympa/language supported_langs $supported_langs
125
99
db_input medium sympa/language || [ $? -eq 30 ]
126
100
db_go
127
101
 
217
191
                 
218
192
            fi
219
193
 
 
194
                db_user=`perl -nle 'if (/^\s*db_user\s+(.*)$/) {print $1;}' $conf`
 
195
            if [ -n "$db_user" ]; then
 
196
                db_set sympa/db_user "$db_user"
 
197
            fi
 
198
 
220
199
            db_passwd=`perl -nle 'if (/^\s*db_passwd\s+(.*)$/) {print $1;}' $conf`
221
200
            if [ -n "$db_passwd" ]; then
222
201
                db_set sympa/db_passwd "$db_passwd"
242
221
        db_get sympa/db_port
243
222
        db_port="$RET"
244
223
        
245
 
        db_get sympa/db_type
246
 
        db_type="$RET"
247
224
        db_subst sympa/db_port database "$db_type"
248
225
 
249
 
        pass_required=1
250
 
 
251
226
        case "$db_type" in
252
227
        "MySQL")
253
228
            if [ -z "$db_port" ]; then
254
229
                        db_port=3306
255
230
                db_set sympa/db_port $db_port
256
231
            fi
257
 
                if [ "db_hostname" = "localhost" ]; then
258
 
                        if mysql -p $db_port mysql </dev/null; then
259
 
                                pass_required=0
260
 
                        fi
261
 
                fi
262
232
            ;;
263
233
        "PostgreSQL")
264
234
                db_input medium sympa/db_authtype || [ $? -eq 30 ]
320
290
    db_input medium sympa/db_options || [ $? -eq 30 ]
321
291
    db_go
322
292
 
323
 
#       if [ "$pass_required" = 0 ]; then
324
 
                db_input medium sympa/db_askifpassneeded || [ $? -eq 30 ]
325
 
                db_go
326
 
                db_get sympa/db_askifpassneeded
327
 
                if [ "$RET" = "true" ]; then
328
 
                        pass_required=1
329
 
                        db_reset sympa/db_adminpasswd
330
 
                fi
331
 
#       fi
332
 
 
333
 
        if [ "$pass_required" = 1 ]; then
334
 
                # Ask for the admin password
335
 
                db_get sympa/db_type
336
 
                db_type="$RET"
337
 
                db_subst sympa/db_adminpasswd database "$db_type"
338
 
 
339
 
                db_input critical sympa/db_adminpasswd || [ $? -eq 30 ]
340
 
                db_go
341
 
        fi
 
293
        # Ask for the admin password
 
294
        db_get sympa/db_type
 
295
        db_type="$RET"
 
296
        db_subst sympa/db_adminpasswd database "$db_type"
 
297
 
 
298
        db_input critical sympa/db_adminpasswd || [ $? -eq 30 ]
 
299
        db_go
342
300
 
343
301
    db_input medium sympa/db_configured || [ $? -eq 30 ]
344
302
    db_go
345
303
fi
346
304
 
347
 
# Get the url from sympa.conf
348
 
url=`echo -n 'http://'; hostname -f | tr -d "\n"; echo -n '/wws'`
349
 
 
350
 
db_subst sympa/use_wwsympa url "$url"
351
 
 
352
305
# Ask for WWSympa usage
353
306
db_input medium sympa/use_wwsympa || [ $? -eq 30 ]
354
307
db_go
360
313
 
361
314
    conf='/etc/sympa/wwsympa.conf'
362
315
 
 
316
        wwsympa_url_default="http://${host}/wws"
 
317
 
 
318
        # Get the url from sympa.conf
 
319
    if [ -f /etc/sympa/sympa.conf ]; then
 
320
       wwsympa_url_conf=`perl -nle 'if (/^\s*wwsympa_url\s+(.*)$/) {print $1;}' $conf`
 
321
       if [ -z "$wwsympa_url" ]; then 
 
322
          db_get wwsympa/wwsympa_url
 
323
                  wwsympa_url_conf="$RET"
 
324
       fi
 
325
    fi
 
326
 
 
327
        if [ -z "$wwsympa_url_conf" ]; then
 
328
                db_set wwsympa/wwsympa_url "$wwsympa_url_default"
 
329
        else 
 
330
                db_set wwsympa/wwsympa_url "$wwsympa_url_conf"
 
331
        fi
 
332
 
 
333
    db_input medium wwsympa/wwsympa_url || [ $? -eq 30 ]
 
334
    db_go
 
335
 
363
336
    if [ -f /etc/sympa/wwsympa.conf ]; then
364
337
        fastcgi=`perl -nle 'if (/^\s*use_fast_cgi\s+(\d)$/) {print $1;}' $conf`
365
338
        case $fastcgi in
372
345
        esac
373
346
        db_set wwsympa/fastcgi "$fastcgi"
374
347
        
375
 
        title=`perl -nle 'if (/^\s*title\s+(.*)$/) {print $1;}' $conf`
376
 
        db_set wwsympa/title "$title"
377
 
        
378
 
        cookie_expire=`perl -nle 'if (/^\s*cookie_expire\s+(\d+)/) {print $1;}' $conf`
379
 
        db_set wwsympa/cookie_expire "$cookie_expire"
380
 
        
381
 
        cookie_domain=`perl -nle 'if (/^\s*cookie_domain\s+(.*)$/) {print $1;}' $conf`
382
 
        db_set wwsympa/cookie_domain "$cookie_domain"
383
348
    fi
384
349
 
385
350
    # Ask for the installed web server
393
358
        # Ask for fastCGI configuration
394
359
        db_input medium wwsympa/fastcgi || [ $? -eq 30 ]
395
360
        db_go
 
361
# Ask for soap usage
 
362
        db_input medium sympa/use_soap || [ $? -eq 30 ]
 
363
        db_go
 
364
 
 
365
        db_get sympa/use_soap
 
366
        use_soap="$RET"
 
367
 
 
368
        if [ use_soap="true" ]; then    
 
369
            soap_url="http://${host}/sympasoap"
 
370
                if [ -f /etc/sympa/sympa.conf ]; then
 
371
                # Get the soap url from sympa.conf
 
372
                        orig_soap_url=`perl -nle 'if (/^\s*soap_url\s+(\d)$/) {print $1;}' /etc/sympa/sympa.conf`
 
373
                        if [ -z "$orig_soap_url" ]; then 
 
374
                                db_get sympa/soap_url
 
375
                                orig_soap_url="$RET"
 
376
                        else
 
377
                                soap_url="$orig_soap_url";
 
378
                        fi
 
379
 
 
380
                        db_set sympa/soap_url "$soap_url"
 
381
 
 
382
                        db_input medium sympa/soap_url || [ $? -eq 30 ]
 
383
                        db_go
 
384
                fi
 
385
    fi
396
386
 
397
387
        db_input high wwsympa/webserver_restart || [ $? -eq 30 ]
398
388
        db_go
399
389
    fi
400
390
 
401
 
    # Ask for the web administration frontend title
402
 
    db_input low wwsympa/title || [ $? -eq 30 ]
403
 
    db_go
404
 
 
405
 
    # Ask for the cookie domain
406
 
    db_input low wwsympa/cookie_domain || [ $? -eq 30 ]
407
 
    db_go
408
 
 
409
 
    # Ask for the cookie expiration delay
410
 
    db_input low wwsympa/cookie_expire || [ $? -eq 30 ]
411
 
    db_go
412
 
 
413
391
    # Ask for spool directories removal
414
392
    db_input medium wwsympa/remove_spool || [ $? -eq 30 ]
415
393
    db_go