Module: check_mk
Branch: master
Commit: c9c28992b815782600ab5604edeae787bb340f5d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c9c28992b81578…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Apr 17 15:59:37 2012 +0200
FIX: Only showing sudo hint message on sudo error message in automation
command
---
ChangeLog | 2 ++
web/htdocs/wato.py | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6a1766d..94152ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,6 +25,8 @@
all host related wato configuration files to distribute changed tags
* WATO: Added new internal hook pre-activate-changes to execute custom
code BEFORE Check_MK is called to restart Nagios
+ * FIX: Only showing sudo hint message on sudo error message in automation
+ command
Multisite
* Added config option default_ts_format to configure default timestamp
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 65e50d0..7b316b1 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -3405,7 +3405,7 @@ def check_mk_local_automation(command, args=[],
indata=""):
if config.debug:
log_audit(None, "automation", "Automation command %s failed
with exit code %d: %s" % (" ".join(cmd), exitcode, outdata))
raise MKGeneralException("Error running <tt>%s</tt> (exit code
%d): <pre>%s</pre>%s" %
- (" ".join(cmd), exitcode, hilite_errors(outdata), sudo_msg))
+ (" ".join(cmd), exitcode, hilite_errors(outdata),
outdata.lstrip().startswith('sudo:') and sudo_msg or ''))
# On successful "restart" command execute the activate changes hook
if command == 'restart':