summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay.choubey@oracle.com>2012-12-27 17:33:34 +0530
committerNirbhay Choubey <nirbhay.choubey@oracle.com>2012-12-27 17:33:34 +0530
commit3dbf1b3e5fd3a3d280e59b3712529af7e5bd182a (patch)
treed1113aec6f7648923349772371f19e23ebcbdc71 /scripts
parenta8b6224036491b422f43081de72e09bdc5e13eb2 (diff)
downloadmariadb-git-3dbf1b3e5fd3a3d280e59b3712529af7e5bd182a.tar.gz
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'.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysqld_safe.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 75589a2d004..48c98f2fde3 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -393,7 +393,7 @@ then
log_notice "Logging to '$err_log'."
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,
chmod "$fmode" "$err_log" # fix the permissions here!
fi
@@ -599,7 +599,7 @@ do
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
chown $user "$err_log" # flushed yet. we'd recreate it with
chmod "$fmode" "$err_log" # wrong owner next time we log, so set