File: 43_scripts__mysql_update__password.dpatch

package info (click to toggle)
mysql-dfsg-5.0 5.0.32-7etch12
  • links: PTS
  • area: main
  • in suites: etch
  • size: 89,332 kB
  • ctags: 94,781
  • sloc: cpp: 436,297; ansic: 409,141; sh: 40,574; tcl: 30,484; perl: 27,872; yacc: 8,236; makefile: 5,532; java: 4,610; xml: 3,914; pascal: 3,462; sql: 2,673; awk: 1,338; asm: 1,061; sed: 772
file content (59 lines) | stat: -rw-r--r-- 2,034 bytes parent folder | download | duplicates (2)
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
#! /bin/sh /usr/share/dpatch/dpatch-run
## 43_scripts__mysql_update__password.dpatch by <ch@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Adds --password option needed for /etc/mysql/debian-start.
## DP: http://bugs.mysql.com/bug.php?id=19400

@DPATCH@

--- old/scripts/mysql_upgrade_shell.sh.ch	2006-04-27 21:54:24.000000000 +0200
+++ new/scripts/mysql_upgrade_shell.sh	2006-04-27 21:54:55.000000000 +0200
@@ -14,6 +14,7 @@
 
 
 user=root
+password=''
 
 case "$1" in
     --no-defaults|--defaults-file=*|--defaults-extra-file=*)
@@ -36,6 +37,7 @@
     case "$arg" in
       --basedir=*) MY_BASEDIR_VERSION=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
       --user=*) user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
+      --password=*) password=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
       --ldata=*|--data=*|--datadir=*) DATADIR=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
       --force) force=1 ;;
       --verbose) verbose=1 ;;
@@ -100,6 +103,7 @@
   echo "  --datadir  Specifies the data directory"
   echo "  --force    Mysql_upgrade.info file will be ignored"
   echo "  --user     Username for server login if not current user"
+  echo "  --password Password for server login if not empty"
   echo "  --verbose  Display more output about the process"
   echo ""
 
@@ -179,7 +179,7 @@
     then
        echo "mysql_upgrade already done for this version"
     fi
-    $bindir/mysql_fix_privilege_tables --silent $args
+    $bindir/mysql_fix_privilege_tables --silent --user=$user --password=$password $args
     exit 0
   fi
 fi
@@ -185,7 +189,7 @@
 # Run the upgrade
 #
 
-check_args="--check-upgrade --all-databases --auto-repair --user=$user"
+check_args="--check-upgrade --all-databases --auto-repair --user=$user --password=$password"
 
 if test $verbose = 1
 then
@@ -200,4 +204,4 @@
   echo "@MYSQL_BASE_VERSION@" > $CHECK_FILE
 fi
 
-$bindir/mysql_fix_privilege_tables --silent --user=$user $args
+$bindir/mysql_fix_privilege_tables --silent --user=$user --password=$password $args