List:Commits« Previous MessageNext Message »
From:Jonathan Perkin Date:November 20 2009 3:10pm
Subject:bzr commit into mysql-5.6-next-mr-bugfixing branch (jperkin:2948)
Bug#36462
View as plain text  
#At file:///home/sketch/bzr/mysql-next-mr-bugfixing/ based on revid:kostja@stripped

 2948 Jonathan Perkin	2009-11-20
      bug#36462: mysql_install_db fails when run as user root and
                 root-directory not writable
                        
      Rather than use the -w test, attempt the chown and bail out if
      it fails.

    modified:
      scripts/mysql_install_db.sh
=== modified file 'scripts/mysql_install_db.sh'

=== modified file 'scripts/mysql_install_db.sh'
--- a/scripts/mysql_install_db.sh	2009-10-15 12:23:43 +0000
+++ b/scripts/mysql_install_db.sh	2009-11-20 15:09:37 +0000
@@ -358,9 +358,15 @@
     mkdir -p $dir
     chmod 700 $dir
   fi
-  if test -w / -a ! -z "$user"
+  if test -n "$user"
   then
     chown $user $dir
+    if test $? -ne 0
+    then
+      echo "Cannot change ownership of the database directories to the '$user'"
+      echo "user.  Check that you have the necessary permissions and try again."
+      exit 1
+    fi
   fi
 done
 


Attachment: [text/bzr-bundle] bzr/jperkin@sun.com-20091120150937-bdgww00395accn42.bundle
Thread
bzr commit into mysql-5.6-next-mr-bugfixing branch (jperkin:2948)Bug#36462Jonathan Perkin20 Nov