summaryrefslogtreecommitdiff
path: root/kpov_judge
diff options
context:
space:
mode:
authorlb5051@student.uni-lj.si <lb5051@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2014-12-15 16:24:10 +0000
committerlb5051@student.uni-lj.si <lb5051@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2014-12-15 16:24:10 +0000
commit7e7d9c1e05be07301597d3144f1e817524f2b50b (patch)
treeedc65ce37fd57c14b85e9a810a03b6cd40dd67c6 /kpov_judge
parent570f06358422fec64df9a28174760156d050f550 (diff)
Posodobil task(). Napisano približno, delno stestirano, ampak naj bi izpolnjevalo vse funkcije z minimalno interakcijo z sistemom. Minimalni popravki od prejšnjega commita.
TODO: Izpolniti, da pravilno dopolnjuje rezutate. git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@77 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge')
-rw-r--r--kpov_judge/tasks/smb_nfs/task.py28
1 files changed, 16 insertions, 12 deletions
diff --git a/kpov_judge/tasks/smb_nfs/task.py b/kpov_judge/tasks/smb_nfs/task.py
index 1e6121b..a586e33 100644
--- a/kpov_judge/tasks/smb_nfs/task.py
+++ b/kpov_judge/tasks/smb_nfs/task.py
@@ -92,24 +92,28 @@ def task(SMB_NAME, NFS_MOUNT, SHARED_FILENAME, SHARED_FILENAME_CONTENT):
# ["//SMB_NAME/<pot_do_direktorija> on NFS_MOUNT type cifs (rw)", ... ]
# example: ["//192.168.1.92/srv/samba on /mnt/samba type cifs (rw)", ... ]
# Seznam mora imeti vnos za NFS in SMB, morata biti obesena na pravo pot in (rw)
+ # ++ PIKE za namountan SMB/NFS
for m in srvmounts:
# Dobimo pot, filesystem in pravice iz mounta:
split = m.split()
pot = split[2]
- fstype = split[4]
+ fstype = split[4] #mogoče bomo kaj rabli?
pravice = split[5]
- # Pregledamo datoteke v temu direktoriju:
- ls = subprocess.check_output(["ls", pot]).split()
- # Preverimo ce je v imeniku datoteka:
- if SHARED_FILENAME in ls:
- # Če je, primerjamo vsebino:
- cat = subprocess.check_output(["cat", pot+"/"+SHARED_FILENAME])
- if cat == SHARED_FILENAME_CONTENT:
- # DING DING DING PLUS PIKE ZA PRAVO VSEBINO
+ # Preverimo če je namountano na pravilen direktorij:
+ if pot == NFS_MOUNT:
+ # ++PIKE za pravo pot
+ # Pregledamo datoteke v temu direktoriju:
+ ls = subprocess.check_output(["ls", pot]).split()
+ # Preverimo ce je v imeniku datoteka:
+ if SHARED_FILENAME in ls:
+ # Če je, primerjamo vsebino:
+ cat = subprocess.check_output(["cat", pot+"/"+SHARED_FILENAME])
+ if cat == SHARED_FILENAME_CONTENT:
+ # DING DING DING PLUS PIKE ZA PRAVO VSEBINO
+ pass
+ if pravice == "(rw)":
+ # BONUS PIKE ZA READ/WRITE PRAVICE
pass
- if pravice == "(rw)":
- # BONUS PIKE ZA READ/WRITE PRAVICE
- pass
# Samo delno stestirano!