Disable networking when setting up mysql.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Mon, 19 Jul 2010 15:28:50 +0000 (15:28 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Mon, 19 Jul 2010 15:28:50 +0000 (15:28 +0000)
org.glite.lb.yaim/config/functions/config_glite_lb

index e8f7521..34e33b5 100644 (file)
@@ -203,6 +203,15 @@ function config_glite_lb() {
     fi
   fi
 
+  # disable network, restart mysql, if needd
+  grep "skip-networking" /etc/my.cnf > /dev/null
+  if [ ! $? = 0 ]; then
+    mv /etc/my.cnf /etc/my.cnf.orig
+    sed 's/\[mysqld\]/[mysqld]\nskip-networking/' /etc/my.cnf.orig > /etc/my.cnf
+    rm -f /etc/my.cnf.orig
+    /etc/init.d/mysqld stop
+  fi
+
   /sbin/chkconfig mysqld on
   ps ax | grep -v grep |grep mysqld_safe > /dev/null 2>&1
   if [ ! $? = 0 ] ; then