HADOOP-14343. Wrong pid file name in error message when starting secure daemon

Signed-off-by: Allen Wittenauer <aw@apache.org>
This commit is contained in:
Andras Bokor 2017-07-31 20:03:43 -07:00 committed by Allen Wittenauer
parent 1a78c0ff01
commit abbf4129a2
No known key found for this signature in database
GPG Key ID: E01B34FBE846DF38

View File

@ -1873,11 +1873,9 @@ function hadoop_start_secure_daemon_wrapper
(( counter++ ))
done
# this is for the daemon pid creation
#shellcheck disable=SC2086
echo $! > "${jsvcpidfile}" 2>/dev/null
if [[ $? -gt 0 ]]; then
hadoop_error "ERROR: Cannot write ${daemonname} pid ${daemonpidfile}."
if ! echo $! > "${jsvcpidfile}"; then
hadoop_error "ERROR: Cannot write ${daemonname} pid ${jsvcpidfile}."
fi
sleep 1