Просмотр исходного кода

the %start has to be run under susr or the %status command does not work, nevertheless we really want to still start mysqld_safe as rusr

Ralf S. Engelschall 19 лет назад
Родитель
Сommit
27b1f36904
2 измененных файлов с 6 добавлено и 5 удалено
  1. 1 1
      mysql51/mysql51.spec
  2. 5 4
      mysql51/rc.mysql

+ 1 - 1
mysql51/mysql51.spec

@@ -39,7 +39,7 @@ Class:        EVAL
 Group:        Database
 License:      GPL
 Version:      %{V_opkg}
-Release:      20061013
+Release:      20061016
 
 #   package options
 %option       with_server      yes

+ 5 - 4
mysql51/rc.mysql

@@ -36,13 +36,14 @@
     echo "mysql_usable=\"$mysql_usable\""
     echo "mysql_active=\"$mysql_active\""
 
-%start -p 400 -u @l_rusr@
+%start -p 400 -u @l_susr@
     rcService mysql enable yes || exit 0
     rcService mysql active yes && exit 0
     cd @l_prefix@
-    @l_prefix@/bin/mysqld_safe >/dev/null 2>&1 \
-        --pid-file="$mysql_pid_file" \
-        --log-error="$mysql_err_log" &
+    cmd="@l_prefix@/bin/mysqld_safe"
+    cmd="$cmd --pid-file=$mysql_pid_file"
+    cmd="$cmd --log-error=$mysql_err_log"
+    su @l_rusr@ -c "$cmd </dev/null >/dev/null 2>&1 &" </dev/null >/dev/null 2>&1
 
 %stop -p 600 -u @l_susr@
     rcService mysql enable yes || exit 0