[Pkg-ltsp-devel] Bug#700881: ltsp-client-core: thin client can't boot if it has set PRINTER_0_DEVICE in lts.conf

Vagrant Cascadian vagrant at debian.org
Mon Feb 18 22:51:24 UTC 2013


On Mon, Feb 18, 2013 at 01:16:05PM -0800, Vagrant Cascadian wrote:
> Looking at the code, it seems like jetpipe is running from init-ltsp.d, which
> seems a bit early to be starting daemons... It seems to run fine when started
> from /etc/init.d/ltsp-client-core with a quick test.
> 
> Will work on another patch that will hopefully be acceptible for wheezy, 
> starting jetpipe from the ltsp-client-core init script.

I've tested that the following patch can handle multiple print calls without
failing, but don't have the ability to test extensively.

It essentially removes the code from init-ltsp.d/50-jetpipe and calls it as a
function in the ltsp-client-core (ltsp-core upstream) init script.

Packages for amd64 available at:
  
  deb http://cascadia.debian.net/~vagrant/debian UNRELEASED main

Index: ltsp-5.4.2/client/initscripts/ltsp-core
===================================================================
--- ltsp-5.4.2.orig/client/initscripts/ltsp-core	2013-02-18 14:07:20.509826079 -0800
+++ ltsp-5.4.2/client/initscripts/ltsp-core	2013-02-18 14:07:25.593851287 -0800
@@ -35,6 +35,33 @@
 . /lib/lsb/init-functions
 . /usr/share/ltsp/ltsp-init-common
 
+start_printers() {
+for I in 0 1 2; do
+    eval PRINTER_DEVICE=\$\{PRINTER_${I}_DEVICE\}
+    if [ -n "${PRINTER_DEVICE}" ]; then
+        eval PORT=\$\{PRINTER_${I}_PORT:="910${I}"\} 
+        eval BAUD=\$\{PRINTER_${I}_SPEED:-"9600"\}
+        eval SIZE=\$\{PRINTER_${I}_DATABITS:-"8"\}
+        eval PARITY=\$\{PRINTER_${I}_PARITY:-"none"\}
+        eval FLOW=\$\{PRINTER_${I}_FLOWCTRL:-"soft"\}
+
+        JETPIPE_ARGS=
+        [ -n "$BAUD" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -b ${BAUD}"
+        [ -n "$SIZE" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -y ${SIZE}"
+        [ -n "$PARITY" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -p ${PARITY}"
+        if [ -n "$FLOW" ]; then
+            if [ "$FLOW" = "soft" ]; then
+                JETPIPE_ARGS="${JETPIPE_ARGS} -x"  
+            else
+                JETPIPE_ARGS="${JETPIPE_ARGS} -r" 
+            fi
+        fi
+
+        /usr/sbin/jetpipe ${JETPIPE_ARGS} ${PRINTER_DEVICE} ${PORT}
+    fi
+done
+}
+
 case "$1" in
   start)
         log_action_begin_msg "Starting LTSP client..."
@@ -48,6 +75,7 @@
             /bin/plymouth quit --retain-splash
         fi
 
+        start_printers || true
         start_screen_sessions || true
         start_sound || true
 
Index: ltsp-5.4.2/client/share/ltsp/init-ltsp.d/50-jetpipe
===================================================================
--- ltsp-5.4.2.orig/client/share/ltsp/init-ltsp.d/50-jetpipe	2013-02-18 14:07:20.509826079 -0800
+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
@@ -1,24 +0,0 @@
-for I in 0 1 2; do
-    eval PRINTER_DEVICE=\$\{PRINTER_${I}_DEVICE\}
-    if [ -n "${PRINTER_DEVICE}" ]; then
-        eval PORT=\$\{PRINTER_${I}_PORT:="910${I}"\} 
-        eval BAUD=\$\{PRINTER_${I}_SPEED:-"9600"\}
-        eval SIZE=\$\{PRINTER_${I}_DATABITS:-"8"\}
-        eval PARITY=\$\{PRINTER_${I}_PARITY:-"none"\}
-        eval FLOW=\$\{PRINTER_${I}_FLOWCTRL:-"soft"\}
-
-        JETPIPE_ARGS=
-        [ -n "$BAUD" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -b ${BAUD}"
-        [ -n "$SIZE" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -y ${SIZE}"
-        [ -n "$PARITY" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -p ${PARITY}"
-        if [ -n "$FLOW" ]; then
-            if [ "$FLOW" = "soft" ]; then
-                JETPIPE_ARGS="${JETPIPE_ARGS} -x"  
-            else
-                JETPIPE_ARGS="${JETPIPE_ARGS} -r" 
-            fi
-        fi
-
-        /usr/sbin/jetpipe ${JETPIPE_ARGS} ${PRINTER_DEVICE} ${PORT}
-    fi
-done



More information about the Pkg-ltsp-devel mailing list