Module: check_mk
Branch: master
Commit: 08e2ff3ab30abb27af9974be5f0d526bce5fed4e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=08e2ff3ab30abb…
Author: Marcel Schulte <ms(a)mathias-kettner.de>
Date: Tue Dec 27 17:09:07 2016 +0100
applied problem handled in werk#3649 to another line of Linux agent
Change-Id: I0ff0c748130da567eb807b908ec2fa31c515c527
---
agents/check_mk_agent.linux | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 82fe4df..146cd70 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -1006,7 +1006,10 @@ then
fi
function is_valid_plugin () {
- [[ -f "$1" && -x "$1" && ! "$1" =~
\.dpkg-(new|old|temp)$ ]] && true || false
+ # NOTE: Due to an escaping-related bug in some old bash versions
+ # (3.2.x), we have to use an intermediate variable for the pattern.
+ pattern='\.dpkg-(new|old|temp)$'
+ [[ -f "$1" && -x "$1" && ! "$1" =~
$pattern ]] && true || false
}