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

This commit is contained in:
Jenkins 2016-11-29 16:15:32 +00:00 committed by Gerrit Code Review
commit 33227ff54c
1 changed files with 1 additions and 1 deletions

View File

@ -671,7 +671,7 @@ mysql_start() {
# already existed, check whether it is writable by the configured
# user
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"
exit $OCF_ERR_PERM;
fi