summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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):