~ubuntu-branches/ubuntu/intrepid/bugzilla/intrepid

« back to all changes in this revision

Viewing changes to debian/bugzilla3.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 bugzilla3 $@
 
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 bugzilla3/bugzilla_admin_pwd seen
 
18
if [ "$RET" = "true" ]; then
 
19
    db_get bugzilla3/bugzilla_admin_pwd || true
 
20
    db_set bugzilla3/pwd_check "$RET"
 
21
else
 
22
    db_set bugzilla3/pwd_check ""
 
23
fi
 
24
 
 
25
# prompt the user for values
 
26
db_beginblock
 
27
    db_input high bugzilla3/bugzilla_admin_name || true
 
28
    db_input high bugzilla3/bugzilla_admin_real_name || true
 
29
    if db_input high bugzilla3/bugzilla_admin_pwd || [ ! "$?" = "30" ] ; then  
 
30
        db_input high bugzilla3/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 bugzilla3/$FIELD || true
 
38
        if [ "$RET" = "" ]; then
 
39
            #none of theres field should be empty
 
40
            db_reset bugzilla3/$FIELD
 
41
        fi
 
42
    done
 
43
 
 
44
    db_get bugzilla3/bugzilla_admin_pwd || true
 
45
    PWD=$RET
 
46
    db_get bugzilla3/pwd_check || true
 
47
    if [ "$RET" != "$PWD" ]; then
 
48
        db_reset bugzilla3/bugzilla_admin_pwd
 
49
        db_reset bugzilla3/pwd_check
 
50
        db_reset bugzilla3/pwd_check
 
51
    fi
 
52
fi
 
53