Mageia Bugzilla – Attachment 8952 Details for
Bug 20143
mysqld is not Active after start
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
mysqld_safe patch handling syslog case
mysqld_safe.patch (text/plain), 1.71 KB, created by
Arne Spiegelhauer
on 2017-02-12 15:48:42 CET
(
hide
)
Description:
mysqld_safe patch handling syslog case
Filename:
MIME Type:
Creator:
Arne Spiegelhauer
Created:
2017-02-12 15:48:42 CET
Size:
1.71 KB
patch
obsolete
>--- /usr/bin/mysqld_safe.orig 2017-01-29 20:16:41.000000000 +0100 >+++ /usr/bin/mysqld_safe 2017-02-12 15:13:31.956142413 +0100 >@@ -1,4 +1,4 @@ >-#!/bin/sh >+#!/bin/bash > # Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB > # This file is public domain and comes with NO WARRANTY of any kind > # >@@ -173,8 +173,12 @@ > > eval_log_error () { > local cmd="$1" >+ local redir_cmd=":" > case $logging in >- file) cmd="$cmd 2>&1 | "`shell_quote_string "$helper"`" $user log "`shell_quote_string "$err_log"` ;; >+ file) >+ cmd="$cmd 2>&1 | "`shell_quote_string "$helper"`" $user log "`shell_quote_string "$err_log"` >+ redir_cmd="exec >$err_log 2>$err_log" >+ ;; > syslog) > # mysqld often prefixes its messages with a timestamp, which is > # redundant when logging to syslog (which adds its own timestamp) >@@ -183,6 +187,7 @@ > # which means that messages may not get sent to syslog until the > # mysqld process quits. > cmd="$cmd 2>&1 | logger -t '$syslog_tag_mysqld' -p daemon.error" >+ redir_cmd="exec > >(exec /usr/bin/logger -t $syslog_tag_mysqld -p daemon.error 2>/dev/null) 2>&1" > ;; > *) > echo "Internal program error (non-fatal):" \ >@@ -194,7 +199,8 @@ > then > # We'd prefer to exec $cmd here, but SELinux needs to be fixed first > #/usr/bin/logger "Running mysqld: $cmd" >- eval "$cmd &" >+ eval $redir_cmd >+ exec $1 > exit 0 > else > #echo "Running mysqld: [$cmd]" >@@ -973,7 +979,7 @@ > [ $dry_run -eq 1 ] && return > > # Avoid 'nohup: ignoring input' warning >-test -n "$NOHUP_NICENESS" && cmd="$cmd < /dev/null" >+#test -n "$NOHUP_NICENESS" && cmd="$cmd < /dev/null" > > log_notice "Starting $MYSQLD daemon with databases from $DATADIR" >
--- /usr/bin/mysqld_safe.orig 2017-01-29 20:16:41.000000000 +0100 +++ /usr/bin/mysqld_safe 2017-02-12 15:13:31.956142413 +0100 @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB # This file is public domain and comes with NO WARRANTY of any kind # @@ -173,8 +173,12 @@ eval_log_error () { local cmd="$1" + local redir_cmd=":" case $logging in - file) cmd="$cmd 2>&1 | "`shell_quote_string "$helper"`" $user log "`shell_quote_string "$err_log"` ;; + file) + cmd="$cmd 2>&1 | "`shell_quote_string "$helper"`" $user log "`shell_quote_string "$err_log"` + redir_cmd="exec >$err_log 2>$err_log" + ;; syslog) # mysqld often prefixes its messages with a timestamp, which is # redundant when logging to syslog (which adds its own timestamp) @@ -183,6 +187,7 @@ # which means that messages may not get sent to syslog until the # mysqld process quits. cmd="$cmd 2>&1 | logger -t '$syslog_tag_mysqld' -p daemon.error" + redir_cmd="exec > >(exec /usr/bin/logger -t $syslog_tag_mysqld -p daemon.error 2>/dev/null) 2>&1" ;; *) echo "Internal program error (non-fatal):" \ @@ -194,7 +199,8 @@ then # We'd prefer to exec $cmd here, but SELinux needs to be fixed first #/usr/bin/logger "Running mysqld: $cmd" - eval "$cmd &" + eval $redir_cmd + exec $1 exit 0 else #echo "Running mysqld: [$cmd]" @@ -973,7 +979,7 @@ [ $dry_run -eq 1 ] && return # Avoid 'nohup: ignoring input' warning -test -n "$NOHUP_NICENESS" && cmd="$cmd < /dev/null" +#test -n "$NOHUP_NICENESS" && cmd="$cmd < /dev/null" log_notice "Starting $MYSQLD daemon with databases from $DATADIR"
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 20143
:
8915
|
8925
|
8936
|
8937
|
8938
|
8944
| 8952 |
8953
|
8954
|
8955