diff --git a/BUILD/check-cpu b/BUILD/check-cpu
index db1a016ec67ed7bd776139c9498a18eb529ef1d9..55f4e62327be0f77e3a2d99b43f83d69646023c7 100755
--- a/BUILD/check-cpu
+++ b/BUILD/check-cpu
@@ -5,9 +5,13 @@
 #
 
 check_cpu () {
-  if test -r /proc/cpuinfo ; then
+  CPUINFO=/proc/cpuinfo
+  if test -n "$TEST_CPUINFO" ; then
+    CPUINFO=$TEST_CPUINFO
+  fi
+  if test -r "$CPUINFO" -a "$CPUINFO" != " " ; then
     # on Linux (and others?) we can get detailed CPU information out of /proc
-    cpuinfo="cat /proc/cpuinfo"
+    cpuinfo="cat $CPUINFO"
 
     # detect CPU family
     cpu_family=`$cpuinfo | grep 'family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
@@ -33,6 +37,7 @@ check_cpu () {
     done
   else
     # Fallback when there is no /proc/cpuinfo
+    CPUINFO=" "
     case "`uname -s`" in
       FreeBSD|OpenBSD)
         cpu_family=`uname -m`;
@@ -84,6 +89,18 @@ check_cpu () {
     *Pentium*M*pro*)
       cpu_arg="pentium-m";
     ;;
+    *Celeron\(R\)*\ M*)
+      cpu_arg="pentium-m";
+    ;;
+    *Celeron*Coppermine*)
+      cpu_arg="pentium3"
+    ;;
+    *Celeron\(R\)*)
+      cpu_arg="pentium4"
+    ;;
+    *Celeron*)
+      cpu_arg="pentium2";
+    ;;
     *Athlon*64*)
       cpu_arg="athlon64";
       ;;
@@ -120,7 +137,14 @@ check_cpu () {
   esac
 
 
-  if test -z "$cpu_arg"; then
+  if test -z "$cpu_arg" ; then
+    if test "$CPUINFO" != " " ; then
+      # fallback to uname if necessary
+      TEST_CPUINFO=" "
+      check_cpu_cflags=""
+      check_cpu
+      return
+    fi
     echo "BUILD/check-cpu: Oops, could not find out what kind of cpu this machine is using." >&2
     check_cpu_cflags=""
     return
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 83a440f5ec43625709fbab8530fae9d6d8626d28..e6e613d073cfab624f359fdb0e6a7f649fe90bb9 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -1036,7 +1036,7 @@ sub command_line_setup () {
   # On some operating systems, there is a limit to the length of a
   # UNIX domain socket's path far below PATH_MAX, so try to avoid long
   # socket path names.
-  $sockdir = tempdir(CLEANUP => 1) if ( length($sockdir) > 80 );
+  $sockdir = tempdir(CLEANUP => 0) if ( length($sockdir) > 80 );
 
   # Put this into a hash, will be a C struct
 
diff --git a/scripts/mysqlaccess.sh b/scripts/mysqlaccess.sh
index 22e9d121f9a6bb4000925b8209e30d5727083e72..bcaf9f8af8ec0acf89f40849a24c7c2156ca621b 100644
--- a/scripts/mysqlaccess.sh
+++ b/scripts/mysqlaccess.sh
@@ -465,6 +465,9 @@ MySQLaccess::Report::Print_Header();
   elsif (-f "@sysconfdir@/$script_conf") {
      require "@sysconfdir@/$script_conf";
   }
+  elsif (-f "/etc/$script_conf") {
+     require "/etc/$script_conf";
+  }
 
 # ****************************
 # Read in all parameters
@@ -930,6 +933,7 @@ sub MergeConfigFile {
 sub MergeConfigFiles {
     my ($name,$pass,$uid,$gid,$quota,$comment,$gcos,$dir,$shell) = getpwuid $<;
     MergeConfigFile("@sysconfdir@/my.cnf");
+    MergeConfigFile("/etc/my.cnf");
     MergeConfigFile("$dir/.my.cnf");
 }
 
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh
index 91afe49b46bbbc03aa76a11b439b4f08124f3a74..a68ee7fed28f3cf5471da3ec0e0e93d2e75e9c12 100644
--- a/scripts/mysqld_multi.sh
+++ b/scripts/mysqld_multi.sh
@@ -467,6 +467,9 @@ sub find_groups
     if (-f "@sysconfdir@/my.cnf" && -r "@sysconfdir@/my.cnf")
     {
       open(MY_CNF, "<@sysconfdir@/my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
+    } elsif (-f "/etc/my.cnf" && -r "/etc/my.cnf")
+    {
+      open(MY_CNF, "</etc/my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
     }
     for ($i = 0; ($line = shift @tmp); $i++)
     {