diff --git a/heartbeat/ocf-shellfuncs.in b/heartbeat/ocf-shellfuncs.in index 760790cbdb..1e83676a7b 100644 --- a/heartbeat/ocf-shellfuncs.in +++ b/heartbeat/ocf-shellfuncs.in @@ -924,13 +924,11 @@ ocf_unique_rundir() # OCF_TRACE_FILE is set to a path. # ocf_bash_has_xtracefd() { - echo "$SHELL" | grep bash > /dev/null && - [ ${BASH_VERSINFO[0]} -ge 4 ] + [ -n "$BASH_VERSION" ] && [ ${BASH_VERSINFO[0]} -ge 4 ] } # for backwards compatibility ocf_is_bash4() { ocf_bash_has_xtracefd - return $? } ocf_trace_redirect_to_file() { local dest=$1