MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:kent Date:January 1 2007 4:30am
Subject:bk commit into 4.1 tree (kent:1.2585) BUG#24605
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of kent. When kent does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-01-01 05:30:31+01:00, kent@stripped +2 -0
  mysql_secure_installation.sh:
    Portable handling of "echo" without newline (bug#24605)
  check-cpu:
    In developer script safe to use "printf", not "echo -n"

  BUILD/check-cpu@stripped, 2007-01-01 05:27:01+01:00, kent@stripped +1 -2
    In developer script safe to use "printf", not "echo -n"

  scripts/mysql_secure_installation.sh@stripped, 2007-01-01 05:29:41+01:00, kent@stripped +20 -9
    Portable handling of "echo" without newline (bug#24605)

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	kent
# Host:	kent-amd64.(none)
# Root:	/home/kent/bk/tmp/mysql-4.1-build

--- 1.3/scripts/mysql_secure_installation.sh	2007-01-01 05:30:34 +01:00
+++ 1.4/scripts/mysql_secure_installation.sh	2007-01-01 05:30:34 +01:00
@@ -22,6 +22,16 @@
 trap "interrupt" 2
 
 rootpass=""
+echo_n=
+echo_c=
+
+set_echo_compat() {
+    case `echo "testing\c"`,`echo -n testing` in
+	*c*,-n*) echo_n=   echo_c=     ;;
+	*c*,*)   echo_n=-n echo_c=     ;;
+	*)       echo_n=   echo_c='\c' ;;
+    esac
+}
 
 prepare() {
     touch $config $command
@@ -45,7 +55,7 @@
     status=1
     while [ $status -eq 1 ]; do
 	stty -echo
-	echo -n "Enter current password for root (enter for none): "
+	echo $echo_n "Enter current password for root (enter for none): $echo_c"
 	read password
 	echo
 	stty echo
@@ -65,10 +75,10 @@
 
 set_root_password() {
     stty -echo
-    echo -n "New password: "
+    echo $echo_n "New password: $echo_c"
     read password1
     echo
-    echo -n "Re-enter new password: "
+    echo $echo_n "Re-enter new password: $echo_c"
     read password2
     echo
     stty echo
@@ -173,6 +183,7 @@
 # The actual script starts here
 
 prepare
+set_echo_compat
 
 echo
 echo
@@ -201,11 +212,11 @@
 echo
 
 if [ $hadpass -eq 0 ]; then
-    echo -n "Set root password? [Y/n] "
+    echo $echo_n "Set root password? [Y/n] $echo_c"
 else
     echo "You already have a root password set, so you can safely answer 'n'."
     echo
-    echo -n "Change the root password? [Y/n] "
+    echo $echo_n "Change the root password? [Y/n] $echo_c"
 fi
 
 read reply
@@ -232,7 +243,7 @@
 echo "production environment."
 echo
 
-echo -n "Remove anonymous users? [Y/n] "
+echo $echo_n "Remove anonymous users? [Y/n] $echo_c"
 
 read reply
 if [ "$reply" = "n" ]; then
@@ -251,7 +262,7 @@
 echo "ensures that someone cannot guess at the root password from the network."
 echo
 
-echo -n "Disallow root login remotely? [Y/n] "
+echo $echo_n "Disallow root login remotely? [Y/n] $echo_c"
 read reply
 if [ "$reply" = "n" ]; then
     echo " ... skipping."
@@ -270,7 +281,7 @@
 echo "before moving into a production environment."
 echo
 
-echo -n "Remove test database and access to it? [Y/n] "
+echo $echo_n "Remove test database and access to it? [Y/n] $echo_c"
 read reply
 if [ "$reply" = "n" ]; then
     echo " ... skipping."
@@ -288,7 +299,7 @@
 echo "will take effect immediately."
 echo
 
-echo -n "Reload privilege tables now? [Y/n] "
+echo $echo_n "Reload privilege tables now? [Y/n] $echo_c"
 read reply
 if [ "$reply" = "n" ]; then
     echo " ... skipping."

--- 1.13/BUILD/check-cpu	2007-01-01 05:30:34 +01:00
+++ 1.14/BUILD/check-cpu	2007-01-01 05:30:34 +01:00
@@ -167,8 +167,7 @@
   touch __test.c
 
   while [ "$cpu_arg" ] ; do
-    # FIXME: echo -n isn't portable - see contortions autoconf goes through
-    echo -n testing $cpu_arg "... " >&2
+    printf "testing $cpu_arg ... " >&2
           
     # compile check
     check_cpu_cflags=`eval echo $check_cpu_args`
Thread
bk commit into 4.1 tree (kent:1.2585) BUG#24605kent1 Jan