Author: alexander
Date: 2007-09-30 05:35:44 -0600 (Sun, 30 Sep 2007)
New Revision: 2087

Added:
   trunk/packages/livecd-bootscripts/speakup
   trunk/packages/livecd-bootscripts/speakup-restart
Modified:
   trunk/packages/lfs-bootscripts/lfs-bootscripts-livecd-1.patch
   trunk/packages/livecd-bootscripts/Makefile
Log:
Moved the localnet script to S11, because speech-dispatcher needs the "lo"
interface.

Added bootscripts that enable speakup when the user appends the
speakup.synth=XXX parameter to the kernel command line.

Debugging can be done with XXX=dummy (the output will be sent to ttyS0)
or XXX=soft (the CD will speak through the first sound card).

TODO: document this.


Modified: trunk/packages/lfs-bootscripts/lfs-bootscripts-livecd-1.patch
===================================================================
--- trunk/packages/lfs-bootscripts/lfs-bootscripts-livecd-1.patch       
2007-09-30 11:29:26 UTC (rev 2086)
+++ trunk/packages/lfs-bootscripts/lfs-bootscripts-livecd-1.patch       
2007-09-30 11:35:44 UTC (rev 2087)
@@ -103,7 +103,7 @@
 +      ln -sf ../init.d/mountfs     ${EXTDIR}/rc.d/rcsysinit.d/S40mountfs
 +      ln -sf ../init.d/setclock    ${EXTDIR}/rc.d/rcsysinit.d/S60setclock
 +      ln -sf ../init.d/console     ${EXTDIR}/rc.d/rcsysinit.d/S70console
-+      ln -sf ../init.d/localnet    ${EXTDIR}/rc.d/rcsysinit.d/S80localnet
++      ln -sf ../init.d/localnet    ${EXTDIR}/rc.d/rcsysinit.d/S11localnet
 +      if [ ! -f ${EXTDIR}/sysconfig/rc          ]; then install -m 
${CONFMODE} lfs/sysconfig/rc          ${EXTDIR}/sysconfig/; fi
 +      install                   -m ${MODE} lfs/sysconfig/network-devices/ifup 
  ${EXTDIR}/sysconfig/network-devices/
 +      install                   -m ${MODE} 
lfs/sysconfig/network-devices/ifdown ${EXTDIR}/sysconfig/network-devices/

Modified: trunk/packages/livecd-bootscripts/Makefile
===================================================================
--- trunk/packages/livecd-bootscripts/Makefile  2007-09-30 11:29:26 UTC (rev 
2086)
+++ trunk/packages/livecd-bootscripts/Makefile  2007-09-30 11:35:44 UTC (rev 
2087)
@@ -3,7 +3,7 @@
 
 # Targets
 
-SCRIPTS= clkconf langconf brltty brltty-restart
+SCRIPTS= clkconf langconf brltty brltty-restart speakup speakup-restart
 DATA= font.dat font-errors.dat lang.dat
 
 include $(ROOT)/scripts/functions
@@ -21,11 +21,14 @@
        install -d -m755 /etc/langconf
        install -m754 $(SCRIPTS) /etc/rc.d/init.d
        install -m644 $(DATA) /etc/langconf
-       ln -sf ../init.d/brltty /etc/rc.d/rcsysinit.d/S11brltty
+       ln -sf ../init.d/brltty /etc/rc.d/rcsysinit.d/S12brltty
+       ln -sf ../init.d/speakup /etc/rc.d/rcsysinit.d/S12speakup
        ln -sf ../init.d/clkconf /etc/rc.d/rcsysinit.d/S59clkconf
        ln -sf ../init.d/langconf /etc/rc.d/rcsysinit.d/S69langconf
        # brltty has to be restarted in order to see the font change
+       # and speakup has to react to the language change
        ln -sf ../init.d/brltty-restart /etc/rc.d/rcsysinit.d/S71brltty-restart
+       ln -sf ../init.d/speakup-restart 
/etc/rc.d/rcsysinit.d/S71speakup-restart
 
 clean:
 

Added: trunk/packages/livecd-bootscripts/speakup
===================================================================
--- trunk/packages/livecd-bootscripts/speakup                           (rev 0)
+++ trunk/packages/livecd-bootscripts/speakup   2007-09-30 11:35:44 UTC (rev 
2087)
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+read SYNTH </sys/module/speakup/parameters/synth
+
+case "${1}" in
+       start)
+               if [ "$SYNTH" != "<NULL>" ] ; then
+                 boot_mesg "Activating speakup..."
+                 modprobe "speakup_$SYNTH" && udevsettle
+                 evaluate_retval
+                 if [ "$SYNTH" = "soft" ] ; then
+                         boot_mesg "Starting software speech synthesizer..."
+                         loadproc speech-dispatcher 2>/dev/null &&
+                         loadproc speechd-up
+                         evaluate_retval
+                 fi
+                 # Some applications need to be configured specially
+                 # in order to show cursor on selected items in menus
+                 echo 'visit_items=ON' >>/etc/dialogrc
+                 echo 'set braille_friendly=yes' >>/root/.muttrc
+                 sed -i 's/^#SHOW_CURSOR:FALSE/SHOW_CURSOR:TRUE/' /etc/lynx.cfg
+                 # FIXME: does not help
+                 # sed -i 's/^draw_arrow=OFF/draw_arrow=ON/' /etc/tin/tinrc
+                 # FIXME: others
+               fi
+               ;;
+       *)
+               echo "Usage: ${0} {start}"
+               exit 1
+               ;;
+esac

Added: trunk/packages/livecd-bootscripts/speakup-restart
===================================================================
--- trunk/packages/livecd-bootscripts/speakup-restart                           
(rev 0)
+++ trunk/packages/livecd-bootscripts/speakup-restart   2007-09-30 11:35:44 UTC 
(rev 2087)
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+read SYNTH </sys/module/speakup/parameters/synth
+
+export LANG=`( . /etc/profile ; echo $LANG )`
+LL=${LANG%%_*}
+CHARMAP=`locale charmap`
+
+if [ "$CHARMAP" = "ANSI_X3.4-1968" ] ; then
+       CHARMAP="ISO-8859-1"
+fi
+
+case "${1}" in
+       start)
+               if [ "$SYNTH" = "soft" ] ; then
+                 boot_mesg "Restarting software speech synthesizer..."
+                 killproc /usr/bin/speechd-up >/dev/null 2>&1
+                 killproc /usr/bin/speech-dispatcher >/dev/null 2>&1
+                 sed -i "/DefaultLanguage/s/en/$LL/" 
/etc/speech-dispatcher/speechd.conf
+                 loadproc speech-dispatcher 2>/dev/null &&
+                 loadproc /usr/bin/speechd-up -c "$CHARMAP"
+                 evaluate_retval
+               fi
+               ;;
+       *)
+               echo "Usage: ${0} {start}"
+               exit 1
+               ;;
+esac

-- 
http://linuxfromscratch.org/mailman/listinfo/livecd
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to