~ubuntu-branches/ubuntu/precise/netams/precise

« back to all changes in this revision

Viewing changes to debian/netams.config

  • Committer: Bazaar Package Importer
  • Author(s): Alexander GQ Gerasiov
  • Date: 2009-11-26 02:08:19 UTC
  • Revision ID: james.westby@ubuntu.com-20091126020819-mfn4urmlr1id955h
Tags: 3.4.3+dfsg1-3
debian/copyright: add more details about sources of some part of the
code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh 
 
2
 
 
3
set -e
 
4
 
 
5
. /usr/share/debconf/confmodule
 
6
db_version 2.0 
 
7
 
 
8
# only ask this question on fresh installs.
 
9
if [ "$1" = "configure" ] && [ -z "$2" ]; then
 
10
  while :; do
 
11
    RET=""
 
12
    db_input critical netams/admin-password || true
 
13
    db_go
 
14
    db_get netams/admin-password
 
15
    # if password isn't empty we ask for password verification
 
16
    if [ -z "$RET" ]; then
 
17
      db_fset netams/password-empty seen false
 
18
      db_input critical netams/password-empty
 
19
      continue
 
20
    fi
 
21
    admin_pw="$RET"
 
22
    db_input critical netams/admin-password-again || true
 
23
    db_go
 
24
    db_get netams/admin-password-again
 
25
    if [ "x$RET" = "x$admin_pw" ]; then
 
26
      admin_pw=''
 
27
      db_set netams/admin-password-again ""
 
28
      # set this fields as unseen for situation when dbconfig failed and
 
29
      # config will be started again
 
30
      db_fset netams/admin-password seen false
 
31
      db_fset netams/admin-password-again seen false
 
32
      break
 
33
    fi
 
34
    db_fset netams/password-mismatch seen false
 
35
    db_input critical netams/password-mismatch
 
36
    db_set netams/admin-password "" 
 
37
    db_set netams/admin-password-again ""
 
38
    db_go
 
39
  done
 
40
fi
 
41
 
 
42
if [ -f /usr/share/dbconfig-common/dpkg/config ]; then
 
43
        # we support mysql
 
44
        dbc_dbtypes="mysql"
 
45
        dbc_upgrade="false"
 
46
 
 
47
        # source dbconfig-common stuff
 
48
        . /usr/share/dbconfig-common/dpkg/config
 
49
        dbc_go netams $@
 
50
fi
 
51
 
 
52
db_input medium netams/reconfigure-webserver || true
 
53
db_go || true