diff options
author | gasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2016-12-19 09:26:21 +0000 |
---|---|---|
committer | gasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2016-12-19 09:26:21 +0000 |
commit | e0172c0b47c502eeebaf56ef30ecd3373be0e17b (patch) | |
tree | 790be2a61b42f6cd06b5cf063a8b2f2b2764e5a1 /kpov_judge/tasks/snmp_agent_uptime | |
parent | 5c248b4c9c2cec05a00fa938fff2a4c184f594e9 (diff) |
fixed permissions in for a SNMP script on snmp_agent_uptime
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@372 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge/tasks/snmp_agent_uptime')
-rw-r--r-- | kpov_judge/tasks/snmp_agent_uptime/task.py | 6 |
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) |