[Pkg-nagios-changes] [pkg-nagios-plugins-contrib] 01/14: Escape '+' in 'uname -v' output in freebsd_check_running_version()
Jan Wagner
waja at moszumanska.debian.org
Mon Sep 29 13:54:56 UTC 2014
This is an automated email from the git hooks/post-receive script.
waja pushed a commit to branch master
in repository pkg-nagios-plugins-contrib.
commit 8165f4192938987dab6e869ed9ccad323c67c550
Author: Manfred Stock <m-debian at nfred.ch>
Date: Sat Sep 20 22:16:35 2014 +0200
Escape '+' in 'uname -v' output in freebsd_check_running_version()
The output from 'uname -v' is later used in a regular expression, so the '+'
from a time zone would be interpreted there, and must therefore be escaped.
---
dsa/checks/dsa-check-running-kernel | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dsa/checks/dsa-check-running-kernel b/dsa/checks/dsa-check-running-kernel
index ca4170e..40fd3b7 100644
--- a/dsa/checks/dsa-check-running-kernel
+++ b/dsa/checks/dsa-check-running-kernel
@@ -172,7 +172,7 @@ freebsd_check_running_version() {
local imagefile="$1"; shift
local r="$(uname -r)"
- local v="$(uname -v| sed -e 's/^#[0-9]*/&:/')"
+ local v="$(uname -v| sed -e 's/^#[0-9]*/&:/' -e 's/\+/\\+/g')"
local q='@\(#\)FreeBSD '"$r $v"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-nagios-plugins-contrib.git
More information about the Pkg-nagios-changes
mailing list