summaryrefslogtreecommitdiffstats
path: root/remote/modules/printergui/data/opt/openslx/scripts
diff options
context:
space:
mode:
authorJonathan Bauer2016-01-08 14:28:46 +0100
committerJonathan Bauer2016-01-08 14:28:46 +0100
commit7106ee223592a0591e267daa7f71162e4ad658b0 (patch)
tree490d793b56807918cbd6197086b5251d08a18145 /remote/modules/printergui/data/opt/openslx/scripts
parent[exam] renamed safe-mode service to 'exam.service' and removed unneeded code (diff)
parent[run-virt] openslx.exe: Hide console, re-set logoff caption periodically (diff)
downloadtm-scripts-7106ee223592a0591e267daa7f71162e4ad658b0.tar.gz
tm-scripts-7106ee223592a0591e267daa7f71162e4ad658b0.tar.xz
tm-scripts-7106ee223592a0591e267daa7f71162e4ad658b0.zip
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Diffstat (limited to 'remote/modules/printergui/data/opt/openslx/scripts')
-rwxr-xr-xremote/modules/printergui/data/opt/openslx/scripts/run-virt_print6
1 files changed, 6 insertions, 0 deletions
diff --git a/remote/modules/printergui/data/opt/openslx/scripts/run-virt_print b/remote/modules/printergui/data/opt/openslx/scripts/run-virt_print
index dfbcdfde..ba352778 100755
--- a/remote/modules/printergui/data/opt/openslx/scripts/run-virt_print
+++ b/remote/modules/printergui/data/opt/openslx/scripts/run-virt_print
@@ -45,8 +45,10 @@ if which gs 2>/dev/null; then
RET=$?
if [ $RET -ne 0 ]; then
errlog "printergui-validate" "Error: Ghostscript choked on input file" "$ERRLOG"
+ rm -f -- "$ERRLOG"
exit 1
fi
+ rm -f -- "$ERRLOG"
else
errlog "printergui-nogs" "Warning: Cannot validate file prior to printing: gs binary not found"
fi
@@ -57,5 +59,9 @@ RET=$?
if [ $RET -ne 0 -a $RET -ne 143 ]; then # SIGTERM results in 143, is sent by printpwgui
errlog "printergui-exec" "Error: printergui execution failed with exit code $RET"
fi
+
+sleep 1
+rm -f -- "$FILE"
+
exit $RET