summaryrefslogtreecommitdiffstats
path: root/remote/modules/vmchooser/data/opt/openslx/scripts
diff options
context:
space:
mode:
authorSimon Rettberg2014-04-28 14:37:51 +0200
committerSimon Rettberg2014-04-28 14:37:51 +0200
commit95fb066795a53f52d6afe46ba47bc593105df88e (patch)
treef085ed9a35c9f0b3babb7ec285ab2141e1e564e0 /remote/modules/vmchooser/data/opt/openslx/scripts
parent[in-system-hack] Fix cupsfilters.convs file (diff)
downloadtm-scripts-95fb066795a53f52d6afe46ba47bc593105df88e.tar.gz
tm-scripts-95fb066795a53f52d6afe46ba47bc593105df88e.tar.xz
tm-scripts-95fb066795a53f52d6afe46ba47bc593105df88e.zip
[vmchooser] Fix creation of spooldir for lpd - remote log if failed
Diffstat (limited to 'remote/modules/vmchooser/data/opt/openslx/scripts')
-rwxr-xr-xremote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt9
1 files changed, 6 insertions, 3 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 26d92dde..30a0d517 100755
--- a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
+++ b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
@@ -446,7 +446,7 @@ amixer -q sset Front "$VOL" unmute 2>/dev/null
amixer -q sset Speaker "$VOL" unmute 2>/dev/null # annoying built-in speaker
amixer -q sset 'Front Mic' "$VOL" unmute 2>/dev/null # to be checked if Mic is actually activated
amixer -q sset 'Rear Mic' "$VOL" unmute 2>/dev/null # =""=
-amixer -q -c pcsp sset Master "0%" mute 2>/dev/null # fix random static noise when starting vmplayer TODO: find out why?!
+amixer -q -c pcsp sset Master "0%" mute 2>/dev/null # fix random static noise when starting vmplayer when module snd_pcsp (not pcspkr) is loaded
# Start printer daemon
QUEUE="STANDARD" # This has to match the queue you configured in your VM
@@ -460,9 +460,12 @@ SPOOLDIR=
#fi
# If failed, try to fall back to /tmp
if [ -z "${SPOOLDIR}" ] || [ ! -w "${SPOOLDIR}/${QUEUE}" ]; then
- SPOOLDIR="/tmp/printergui/${USER}-$$-${RANDOM}/"
+ SPOOLDIR="/tmp/printergui-${USER}-$$-${RANDOM}"
rm -rf -- "${SPOOLDIR}"
- mkdir -p "${SPOOLDIR}/${QUEUE}"
+ if ! mkdir -p "${SPOOLDIR}/${QUEUE}"; then
+ slxlog "virt-spooldir" "Could not create spool directory ($SPOOLDIR) for $USER - printing will not work!"
+ # TODO: Warn user
+ fi
fi
# Start the lpdaemon listening on the given port