Commit 825459b8 authored by Nirbhay Choubey's avatar Nirbhay Choubey

Bug#16046140 BIN/MYSQLD_SAFE: TEST: ARGUMENT EXPECTED

Some shell interpreters do not support '-e' test
primary to construct conditions.

man test 1 (on S10)
...skip...
-e file True if file exists. (Not available in sh.)
...skip...

Hence, check for the existence of a file using
'-e' might result in a syntax error on such
shell programs.

Fixed by replacing it by '-f'.
parent 6b7182d9
...@@ -393,7 +393,7 @@ then ...@@ -393,7 +393,7 @@ then
log_notice "Logging to '$err_log'." log_notice "Logging to '$err_log'."
logging=file logging=file
if [ ! -e "$err_log" ]; then # if error log already exists, if [ ! -f "$err_log" ]; then # if error log already exists,
touch "$err_log" # we just append. otherwise, touch "$err_log" # we just append. otherwise,
chmod "$fmode" "$err_log" # fix the permissions here! chmod "$fmode" "$err_log" # fix the permissions here!
fi fi
...@@ -599,7 +599,7 @@ do ...@@ -599,7 +599,7 @@ do
eval_log_error "$cmd" eval_log_error "$cmd"
if [ $want_syslog -eq 0 -a ! -e "$err_log" ]; then if [ $want_syslog -eq 0 -a ! -f "$err_log" ]; then
touch "$err_log" # hypothetical: log was renamed but not touch "$err_log" # hypothetical: log was renamed but not
chown $user "$err_log" # flushed yet. we'd recreate it with chown $user "$err_log" # flushed yet. we'd recreate it with
chmod "$fmode" "$err_log" # wrong owner next time we log, so set chmod "$fmode" "$err_log" # wrong owner next time we log, so set
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment