Module: check_mk
Branch: master
Commit: b548e0ffa07749ab5257ce49cb60bbe4fdbdeee3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b548e0ffa07749…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri Jul 15 14:18:47 2016 +0200
fixed help option of special agent ipmi
---
agents/special/agent_ipmi_sensors | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/agents/special/agent_ipmi_sensors b/agents/special/agent_ipmi_sensors
index 54025ac..80a1680 100755
--- a/agents/special/agent_ipmi_sensors
+++ b/agents/special/agent_ipmi_sensors
@@ -65,16 +65,6 @@ except getopt.GetoptError, err:
sys.exit(1)
-if len(args) == 1:
- hostname = args[0]
-elif not args:
- sys.stderr.write("ERROR: No host given.\n")
- sys.exit(1)
-else:
- sys.stderr.write("ERROR: Please specify exactly one host.\n")
- sys.exit(1)
-
-
for o, a in opts:
if o in [ '--help' ]:
usage()
@@ -89,6 +79,16 @@ for o, a in opts:
privilege_lvl = a
+if len(args) == 1:
+ hostname = args[0]
+elif not args:
+ sys.stderr.write("ERROR: No host given.\n")
+ sys.exit(1)
+else:
+ sys.stderr.write("ERROR: Please specify exactly one host.\n")
+ sys.exit(1)
+
+
if not (username and password and privilege_lvl):
sys.stderr.write("ERROR: Credentials are missing.\n")
sys.exit(1)