summaryrefslogtreecommitdiffstats
path: root/remote/modules/vmchooser
diff options
context:
space:
mode:
authorManuel Schneider2013-10-18 16:27:44 +0200
committerManuel Schneider2013-10-18 16:27:44 +0200
commit00414cbbf3934cb0fa40bcaf6ac25fe67d2e86c9 (patch)
treebfb0bac71b5f685359b023b9cf339ceb04e438ae /remote/modules/vmchooser
parent[vmchooser] only use dnbd3 for vms if config says SLX_VM_DNBD3=yes (diff)
downloadtm-scripts-00414cbbf3934cb0fa40bcaf6ac25fe67d2e86c9.tar.gz
tm-scripts-00414cbbf3934cb0fa40bcaf6ac25fe67d2e86c9.tar.xz
tm-scripts-00414cbbf3934cb0fa40bcaf6ac25fe67d2e86c9.zip
[cups] Kill LPD when run_virt finishes
Diffstat (limited to 'remote/modules/vmchooser')
-rwxr-xr-xremote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt8
1 files changed, 8 insertions, 0 deletions
diff --git a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
index 261ef8f5..81f8c2e1 100755
--- a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
+++ b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
@@ -428,6 +428,7 @@ if [ "$vtflag" = "1" -a -n "$kvm_module" ]; then
modprobe "$kvm_module"
fi
+
# # # # # # Start printer daemon # # # # # # #
USER="$(whoami)"
SPOOLDIR="/var/spool"
@@ -438,6 +439,9 @@ busybox tcpsvd -E 0.0.0.0 5515 \
busybox lpd "$SPOOLDIR" \
sh -c "printergui $USER $SPOOOLDIR/$QUEUE/\$DATAFILE" &
+# PID to kill the process
+PID_LPD="$!"
+
# Copy guest configuration (with added information) config.xml to be accessed
# via virtual floppy
@@ -527,5 +531,9 @@ if [ -n "${POSTRUN}" ]; then
eval ${POSTRUN} >/dev/null 2>&1
fi
+# Kill LPD
+kill $PID_LPD
+
+
cleanexit 0
exit 0