aboutsummaryrefslogtreecommitdiffstats
path: root/testing/resource-agents/fix-bashism.patch
blob: ca63c2d1a3c057de3f337376fb7f72d00ad4f133 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- ./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