summaryrefslogtreecommitdiff
path: root/kpov_judge
diff options
context:
space:
mode:
authorgasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2016-10-08 22:16:31 +0000
committergasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2016-10-08 22:16:31 +0000
commit0b1b568420d73d11749812abfbea02752a4ad07d (patch)
treeaaacd09871c28e6c180a564517fc26f21080f9cd /kpov_judge
parent35e9a1542f1dd961a09d198977d4c2fed467f4dc (diff)
minor fixes o the mock_entrance_exam task
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@362 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge')
-rw-r--r--kpov_judge/tasks/mock_entrance_exam/task.py5
-rw-r--r--kpov_judge/tasks/set_ip_static_dhcp/task.py20
2 files changed, 17 insertions, 8 deletions
diff --git a/kpov_judge/tasks/mock_entrance_exam/task.py b/kpov_judge/tasks/mock_entrance_exam/task.py
index afe2d66..52772a3 100644
--- a/kpov_judge/tasks/mock_entrance_exam/task.py
+++ b/kpov_judge/tasks/mock_entrance_exam/task.py
@@ -285,7 +285,8 @@ int main(int argc, char **argv){
}
'''
evil_shell_source = """#!/bin/bash -e
-{ while true; do
+
+while true; do
/sbin/ifconfig eth1 10.0.4.19 2> /dev/null;
/sbin/ifconfig eth0 10.0.4.20 2> /dev/null;
/sbin/ifconfig eth2 10.0.4.21 2> /dev/null;
@@ -294,7 +295,7 @@ int main(int argc, char **argv){
/sbin/ifconfig enp0s3 10.0.4.21 2> /dev/null;
/sbin/ifconfig enp0s8 10.0.4.21 2> /dev/null;
sleep 10;
-done; }&
+done;
"""
import random
d = templates['student-entrance']
diff --git a/kpov_judge/tasks/set_ip_static_dhcp/task.py b/kpov_judge/tasks/set_ip_static_dhcp/task.py
index 65ca961..61424fe 100644
--- a/kpov_judge/tasks/set_ip_static_dhcp/task.py
+++ b/kpov_judge/tasks/set_ip_static_dhcp/task.py
@@ -11,9 +11,17 @@ Racunalnike imenujmo enako kot slike diska.
Na maliBrezNetworkManager izklopi networkmanager in uporabi ifup / ifdown.
Na maliNetworkManager nastavi IP naslov {IP_NM} ter DNS {DNS_NM}.
Na maliBrezNetworkManager nastavi IP naslov {IP_static} ter DNS {DNS_static}.
-DNS strežnikov. Naslove dobiš na simpleArbiterDhcpGW.
""",
- 'en':u"""
+ 'en':u"""Create three virtual machines. Use simpleArbiterDhcpGW as the
+disk image for the first, maliNetworkManager as the disk image for the second
+and maliBrezNetworkManager for the third. The virtual machine names can match
+the disks.
+
+Turn off the networkmanager service on maliBrezNetworkManager. Use ifup/ifdown to
+configure the network. The IP should be {IP_static} and the computer should use
+the server {DNS_static} as it's DNS.
+
+On maliNetworkManager, set the IP address to {IP_NM} and use {DNS_NM} as the DNS.
"""
}
@@ -65,10 +73,10 @@ computers = {
networks = { 'net1': {'public': False}, 'test-net': {'public': True} }
params_meta = {
- 'IP_NM': {'descriptions': {'si': 'Naslov maliNetworkManager'}, 'w': False, 'public':True, 'type': 'IP', 'generated': True},
- 'DNS_NM': {'descriptions': {'si': 'DNS za maliNetworkManager'}, 'w': False, 'public':True, 'type': 'IP', 'generated': True},
- 'IP_static': {'descriptions': {'si': 'Naslov maliBrezNetworkManager'}, 'w': False, 'public': True, 'type': 'IP', 'generated': True},
- 'DNS_static': {'descriptions': {'si': 'DNS za maliBrezNetworkManager'}, 'w': False, 'public': True, 'type': 'IP', 'generated': True},
+ 'IP_NM': {'descriptions': {'si': 'Naslov maliNetworkManager', 'en': 'IP address for maliNetworkManager'}, 'w': False, 'public':True, 'type': 'IP', 'generated': True},
+ 'DNS_NM': {'descriptions': {'si': 'DNS za maliNetworkManager', 'en': 'DNS for maliNetworkManager'}, 'w': False, 'public':True, 'type': 'IP', 'generated': True},
+ 'IP_static': {'descriptions': {'si': 'Naslov maliBrezNetworkManager', 'en': 'IP address for maliBrezNetworkManager'}, 'w': False, 'public': True, 'type': 'IP', 'generated': True},
+ 'DNS_static': {'descriptions': {'si': 'DNS za maliBrezNetworkManager', 'en':'DNS for maliBrezNetworkManager'}, 'w': False, 'public': True, 'type': 'IP', 'generated': True},
}
def task(IP_NM, DNS_NM, IP_static, DNS_static):