aports/testing/resource-agents/fix-bashism.patch
2014-10-28 11:07:36 +00:00

13 lines
312 B
Diff

--- ./heartbeat/ocf-shellfuncs.in.orig
+++ ./heartbeat/ocf-shellfuncs.in
@@ -691,8 +691,7 @@
# OCF_TRACE_FILE is set to a path.
#
ocf_is_bash4() {
- echo "$SHELL" | grep bash > /dev/null &&
- [ ${BASH_VERSINFO[0]} = "4" ]
+ [ "${BASH_VERSION%%.*}" = "4" ]
}
ocf_trace_redirect_to_file() {
local dest=$1