~ubuntu-branches/ubuntu/oneiric/bugzilla/oneiric

« back to all changes in this revision

Viewing changes to debian/bugzilla.config

  • Committer: Bazaar Package Importer
  • Author(s): Raphael Bossek
  • Date: 2008-06-27 22:34:34 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20080627223434-0ib57vstn43bb4a3
Tags: 3.0.4.1-1
* Update of French, Russian and German translations. (closes: #488251)
* Added Bulgarian and Belarusian translations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash -e
2
 
 
3
 
# Source debconf library.
4
 
. /usr/share/debconf/confmodule
5
 
 
6
 
# Source the dbconfig library only if dbconfig-common in installed
7
 
if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then
8
 
    . /usr/share/dbconfig-common/dpkg/config.mysql
9
 
    dbc_go bugzilla $@
10
 
fi
11
 
 
12
 
# Establish the preliminaries.
13
 
db_version 2.0
14
 
db_capb backup
15
 
 
16
 
# Is the password known
17
 
db_fget bugzilla/bugzilla_admin_pwd seen
18
 
if [ "$RET" = "true" ]; then
19
 
    db_get bugzilla/bugzilla_admin_pwd || true
20
 
    db_set bugzilla/pwd_check "$RET"
21
 
else
22
 
    db_set bugzilla/pwd_check ""
23
 
fi
24
 
 
25
 
# prompt the user for values
26
 
db_beginblock
27
 
    db_input high bugzilla/bugzilla_admin_name || true
28
 
    db_input high bugzilla/bugzilla_admin_real_name || true
29
 
    if db_input high bugzilla/bugzilla_admin_pwd || [ ! "$?" = "30" ] ; then  
30
 
        db_input high bugzilla/pwd_check || true
31
 
    fi  
32
 
db_endblock
33
 
 
34
 
# refuse null values
35
 
if db_go; then
36
 
    for FIELD in bugzilla_admin_name bugzilla_admin_real_name; do
37
 
        db_get bugzilla/$FIELD || true
38
 
        if [ "$RET" = "" ]; then
39
 
            #none of theres field should be empty
40
 
            db_reset bugzilla/$FIELD
41
 
        fi
42
 
    done
43
 
 
44
 
    db_get bugzilla/bugzilla_admin_pwd || true
45
 
    PWD=$RET
46
 
    db_get bugzilla/pwd_check || true
47
 
    if [ "$RET" != "$PWD" ]; then
48
 
        db_reset bugzilla/bugzilla_admin_pwd
49
 
        db_reset bugzilla/pwd_check
50
 
        db_reset bugzilla/pwd_check
51
 
    fi
52
 
fi
53