Browse code

Fix grep on MySQL configuration file

The file is not readable by non-root users (at least on openSUSE), so we
need to use sudo.

Change-Id: I42fff066a60318a954110736d5352387888931e8

Vincent Untz authored on 2012/06/14 16:20:55
Showing 1 changed files
... ...
@@ -853,7 +853,7 @@ EOF
853 853
     sudo sed -i '/^bind-address/s/127.0.0.1/0.0.0.0/g' $MY_CONF
854 854
 
855 855
     # Set default db type to InnoDB
856
-    if grep -q "default-storage-engine" $MY_CONF; then
856
+    if sudo grep -q "default-storage-engine" $MY_CONF; then
857 857
         # Change it
858 858
         sudo bash -c "source $TOP_DIR/functions; iniset $MY_CONF mysqld default-storage-engine InnoDB"
859 859
     else