Merge "Change approach how to check whether directory is writable" into stable/newton

This commit is contained in:
Jenkins 2016-11-29 16:12:07 +00:00 committed by Gerrit Code Review
commit 0281ca8ee1

View File

@ -687,7 +687,7 @@ mysql_start() {
# already existed, check whether it is writable by the configured # already existed, check whether it is writable by the configured
# user # user
for dir in $pid_dir $socket_dir; do for dir in $pid_dir $socket_dir; do
if ! su -s /bin/sh - $OCF_RESKEY_user -c "test -w $dir"; then if ! /usr/bin/sudo -n -u $OCF_RESKEY_user /usr/bin/test -w $dir; then
ocf_log err "${LH} Directory $dir is not writable by $OCF_RESKEY_user" ocf_log err "${LH} Directory $dir is not writable by $OCF_RESKEY_user"
exit $OCF_ERR_PERM; exit $OCF_ERR_PERM;
fi fi