summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kpov_judge/tasks/snmp_agent_uptime/task.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/kpov_judge/tasks/snmp_agent_uptime/task.py b/kpov_judge/tasks/snmp_agent_uptime/task.py
index d57d28e..f007eec 100644
--- a/kpov_judge/tasks/snmp_agent_uptime/task.py
+++ b/kpov_judge/tasks/snmp_agent_uptime/task.py
@@ -173,8 +173,10 @@ def task_check(results, params):
client_script_uptime = int(results['client_script'].strip())
client_uptime = int(results['client_uptime'].strip())
d = client_uptime - client_script_uptime*60
- if d >= 0 and d < 60:
+ if d >= 0 and d < 2:
score += 3
+ else:
+ hints += "client uptime script output wrong."
server_uptime = int(results['server_uptime'].strip())
lines = results['server_OID'].split('\n')
unique_part_start = params['SNMP_UPTIME_OID'].find('"')
@@ -214,5 +216,5 @@ elif action == '-n' and oid < ".{oid}":
print "{val}"
""".format(oid = task_params['SNMP_CLIENT_OID'], val = task_params['SNMP_VALUE'])
templates['student-SNMPServer'].write('/usr/local/bin/snmpext.py', prog)
- templates['student-SNMPServer'].chmod(0766, '/usr/local/bin/snmpext.py')
+ templates['student-SNMPServer'].chmod(0755, '/usr/local/bin/snmpext.py')
write_default_config(templates['simpleArbiterDhcpGW'], global_params)