File: mysql-server-5.0.config

package info (click to toggle)
mysql-dfsg-5.0 5.0.51a-24%2Blenny5
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 106,168 kB
  • ctags: 94,516
  • sloc: cpp: 447,179; ansic: 411,410; perl: 38,307; sh: 37,449; tcl: 30,484; pascal: 14,851; yacc: 8,559; makefile: 5,078; java: 4,610; xml: 3,953; sql: 2,920; awk: 1,338; asm: 1,061; sed: 772
file content (70 lines) | stat: -rw-r--r-- 2,396 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash -e

. /usr/share/debconf/confmodule

if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }

CNF=/etc/mysql/my.cnf

# Beware that there are two ypwhich one of them needs the 2>/dev/null!
if test -n "`which ypwhich 2>/dev/null`"  &&  ypwhich >/dev/null 2>&1; then
  db_input high mysql-server-5.0/nis_warning || true
  db_go
fi

# only ask this question on fresh installs and during "reconfiguration".  
# there is also an additional check for empty root passwords in the
# postinst script when the tools are available for us to use.
if [ "$1" = "configure" ] && [ -z "$2" ] || [ "$1" = "reconfigure" ]; then
  while :; do
    RET=""
    db_input high mysql-server/root_password || true
    db_go
    db_get mysql-server/root_password
    # if password isn't empty we ask for password verification
    if [ -z "$RET" ]; then
      db_fset mysql-server/root_password seen false
      db_fset mysql-server/root_password_again seen false
      break
    fi
    ROOT_PW="$RET"
    db_input high mysql-server/root_password_again || true
    db_go
    db_get mysql-server/root_password_again
    if [ "$RET" == "$ROOT_PW" ]; then
      ROOT_PW=''
      break
    fi
    db_fset mysql-server/password_mismatch seen false
    db_input critical mysql-server/password_mismatch
    db_set mysql-server/root_password "" 
    db_set mysql-server/root_password_again ""
    db_go
  done
fi

# If this is an upgrade of an already existing installation ask the user if
# we may use the backwards incompatible but more secure password format.
# This should not be shown at dpkg-reconfigure, except for the dist-upgrade,
# my.cnf is for the admin only!
# Read: If mysql was already installed but not from Etch and it was either 4.0
# or had old_passwords enabled before then the system is affected.
if [ -n "$DEBIAN_SCRIPT_TRACE" ]; then
  set +e
  [ "$1" = "configure" ]; x1=$?
  [ -f $CNF ]; x2=$?
  [ ! -f /var/lib/mysql/debian-4.1.flag ]; x31=$?
  egrep -q -i '^[[:space:]]*old.passwords[[:space:]]*=[[:space:]]*(1|true)' $CNF; x32=$?
  set -e
fi 
if [ "$1" = "configure" ] && 
   [ -f $CNF ] && 
   (
     [ ! -f /var/lib/mysql/debian-4.1.flag ] ||
     egrep -q -i '^[[:space:]]*old.passwords[[:space:]]*=[[:space:]]*(1|true)' $CNF
   ) 
then
	db_input medium mysql-server-5.0/need_sarge_compat || true
	db_go
fi