From d3e8f24b4da66059058627168f3f71eaf7626a93 Mon Sep 17 00:00:00 2001 From: "gasperfele@fri1.uni-lj.si" Date: Thu, 9 Apr 2015 18:00:43 +0000 Subject: fixed disk template names git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@298 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414 --- kpov_judge/tasks/openvpn_simple_smb/task.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'kpov_judge/tasks/openvpn_simple_smb') diff --git a/kpov_judge/tasks/openvpn_simple_smb/task.py b/kpov_judge/tasks/openvpn_simple_smb/task.py index 09ad026..c807f90 100644 --- a/kpov_judge/tasks/openvpn_simple_smb/task.py +++ b/kpov_judge/tasks/openvpn_simple_smb/task.py @@ -42,7 +42,7 @@ computers = { 'SimpleArbiter': { 'disks': [ { - 'name': 'SimpleArbiterVPN', + 'name': 'simpleArbiterDhcpGWVPN', # attempt automount }, #{ 'name': 'CDROM', @@ -63,7 +63,7 @@ computers = { }, 'VPNClient1': { 'disks': [ - { 'name': 'VPNClient1', + { 'name': 'student-VPNClient1', }, #{ 'name': 'CDROM', # 'options':{'readonly': True}, @@ -291,7 +291,7 @@ def prepare_disks(templates, params): -----END OpenVPN Static key V1----- """.format(s) keyfile = kpov_random_helpers.fname_gen(r, extension=False) + ".key" - templates['SimpleArbiterVPN'].write("/etc/openvpn/secret.key", s) + templates['simpleArbiterDhcpGWVPN'].write("/etc/openvpn/secret.key", s) netaddr_s = """auto tap0 iface tap0 inet static openvpn server @@ -299,15 +299,15 @@ iface tap0 inet static address {} netmask 255.255.255.0 """.format(params['IP_SimpleArbiterVPN']) - templates['SimpleArbiterVPN'].write_append("/etc/network/interfaces", netaddr_s) + templates['simpleArbiterDhcpGWVPN'].write_append("/etc/network/interfaces", netaddr_s) for i in xrange(3): fname = kpov_random_helpers.fname_gen(r, False) - templates['SimpleArbiterVPN'].write( + templates['simpleArbiterDhcpGWVPN'].write( "/srv/smb/" + fname + '.txt', kpov_random_helpers.fortune(r, 4096)) - templates['VPNClient1'].write("/home/student/" + keyfile, s) + templates['student-VPNClient1'].write("/home/student/" + keyfile, s) # uid, gid (student = ) - templates['VPNClient1'].chown(1000, 1000, "/home/student/" + keyfile) + templates['student-VPNClient1'].chown(1000, 1000, "/home/student/" + keyfile) -- cgit v1.2.1