Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 64987b133a461f9343587b0caa3c3ac8 > files > 11

solidmysql-5.0.45-1mdv2008.0.src.rpm

--- scripts/mysql_install_db.sh	2007-05-02 16:39:59.000000000 +0200
+++ scripts/mysql_install_db.sh.oden	2007-05-10 20:45:25.000000000 +0200
@@ -124,10 +124,10 @@
   pkgdatadir=@pkgdatadir@
 else
   bindir="$basedir/bin"
-  if test -x "$basedir/libexec/mysqld"
+  if test -x "$basedir/libexec/mysqld" -o -x "$basedir/libexec/mysqld-max"
   then
     execdir="$basedir/libexec"
-  elif test -x "$basedir/sbin/mysqld"
+  elif test -x "@libexecdir@/mysqld" -o -x "@libexecdir@/mysqld-max"
   then
     execdir="$basedir/sbin"
   else
@@ -185,6 +185,22 @@
 mysqld_opt=""
 scriptdir=$bindir
 
+# Use the mysqld-max binary by default if the user doesn't specify a binary
+if test -x $execdir/mysqld-max; then
+    mysqld=$execdir/mysqld-max
+elif test -x $execdir/mysqld; then
+    mysqld=$execdir/mysqld
+else
+    if test "$in_rpm" -eq 1; then
+	echo "FATAL ERROR $execdir/mysqld not found!"
+	exit 1
+    else
+	echo "Didn't find $execdir/mysqld"
+	echo "You should do a 'make install' before executing this script"
+	exit 1
+    fi
+fi
+
 if test "$windows" = 1
 then
   mysqld="./sql/mysqld"
@@ -198,19 +214,6 @@
   scriptdir="./scripts"
 fi
 
-if test ! -x $mysqld
-then
-  if test "$in_rpm" = 1
-  then
-    echo "FATAL ERROR $mysqld not found!"
-    exit 1
-  else
-    echo "FATAL ERROR Didn't find $mysqld"
-    echo "You should do a 'make install' before executing this script"
-    exit 1
-  fi
-fi
-
 # Try to determine the hostname
 hostname=`@HOSTNAME@`
 
@@ -249,15 +252,15 @@
 # Create database directories mysql & test
 if test ! -d $ldata; then
   mkdir $ldata;
-  chmod 700 $ldata ;
+  chmod 711 $ldata ;
 fi
 if test ! -d $ldata/mysql; then
   mkdir $ldata/mysql;
-  chmod 700 $ldata/mysql ;
+  chmod 711 $ldata/mysql ;
 fi
 if test ! -d $ldata/test; then
   mkdir $ldata/test;
-  chmod 700 $ldata/test ;
+  chmod 711 $ldata/test ;
 fi
 if test -w / -a ! -z "$user"; then
   chown $user $ldata $ldata/mysql $ldata/test;