warning being output in check
Message-ID: <58d8e548.5eODaOhIgdChHKvr%kb(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Module: check_mk
Branch: master
Commit: 02405ad8547f1dbbf18e83de83ee6840dd4cb53a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=02405ad8547f1d…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Mon Mar 27 12:04:11 2017 +0200
8627 FIX apt: Fix Ubuntu "NOTE: This is only a simulation!" warning being output
in check
When running the Check_MK agent as a non-root user, the apt-get command used in the
mk_apt plugin would output a note that would then appear in the update check.
The agent plugin no longer outputs this message. To fix the problem, you will need
to deploy the updated version of the mk_apt plugin.
Thanks to Barnaby Shearer for the fix!
Change-Id: Ic702a3d474da8d3e57c52d6f7b6ca0bd66d1c0ea
---
.werks/8627 | 16 ++++++++++++++++
agents/plugins/mk_apt | 2 +-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.werks/8627 b/.werks/8627
new file mode 100644
index 0000000..3744eb5
--- /dev/null
+++ b/.werks/8627
@@ -0,0 +1,16 @@
+Title: apt: Fix Ubuntu "NOTE: This is only a simulation!" warning being output
in check
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1490608751
+
+When running the Check_MK agent as a non-root user, the apt-get command used in the
+mk_apt plugin would output a note that would then appear in the update check.
+The agent plugin no longer outputs this message. To fix the problem, you will need
+to deploy the updated version of the mk_apt plugin.
+
+Thanks to Barnaby Shearer for the fix!
diff --git a/agents/plugins/mk_apt b/agents/plugins/mk_apt
index c4ded2d..31f930b 100755
--- a/agents/plugins/mk_apt
+++ b/agents/plugins/mk_apt
@@ -50,7 +50,7 @@ function check_apt_update {
# 1397BC53640DB551
apt-get update -qq 2> /dev/null
fi
- apt-get -o 'Debug::NoLocking=true' -s -qq "$UPGRADE" | grep -v
'^Conf'
+ apt-get -o 'Debug::NoLocking=true' -o
'APT::Get::Show-User-Simulation-Note=false' -s -qq "$UPGRADE" | grep -v
'^Conf'
}