diff options
Diffstat (limited to 'remote/modules/pvs2/data/opt/openslx/bin/pvsstartup')
-rwxr-xr-x | remote/modules/pvs2/data/opt/openslx/bin/pvsstartup | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/remote/modules/pvs2/data/opt/openslx/bin/pvsstartup b/remote/modules/pvs2/data/opt/openslx/bin/pvsstartup index def24a81..16a01708 100755 --- a/remote/modules/pvs2/data/opt/openslx/bin/pvsstartup +++ b/remote/modules/pvs2/data/opt/openslx/bin/pvsstartup @@ -1,15 +1,25 @@ #!/bin/ash -# TODO UNTESTED! timediff=5 +counter=0 + +. /opt/openslx/config +EXAM= +if [ -n "$SLX_EXAM" ]; then + EXAM="--exam-mode" +fi + while [ $timediff -gt 3 ]; do start="$(date +%s)" - pvsclient $@ + pvsclient $EXAM "$@" ret=$? end="$(date +%s)" - /opt/openslx/pvs2/unlock.sh + /opt/openslx/pvs2/kb-unlock.sh [ "$ret" == "0" ] && break timediff=$(( end - start )) + counter=$(( counter + 1 )) + [ $counter -gt 8 ] && break done +exit $ret |