Rework config_swspeak, add config_hwspeak
authorMichael Prokop <devnull@localhost>
Sat, 27 Sep 2008 12:29:54 +0000 (14:29 +0200)
committerMichael Prokop <devnull@localhost>
Sat, 27 Sep 2008 12:29:54 +0000 (14:29 +0200)
autoconfig
autoconfig.functions
autoconfig.small
debian/changelog
grml-autoconfig
grml-bootsplash
language-functions

index ad64265..bef518a 100644 (file)
@@ -3,7 +3,6 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Sat Mar 22 00:42:18 CET 2008 [mika]
 ################################################################################
 
 ################################################################################
 ################################################################################
 
 ################################################################################
@@ -80,6 +79,7 @@ CONFIG_HOTPLUG_AGENT='no'     # deactivate specific hotplug agent(s) via bootpar
 CONFIG_HOTPLUG_BLACKLIST='no' # check for blacklist bootparam
 CONFIG_HOTPLUG_MAIN='no'      # start hotplug system [should be handled by udev now]
 CONFIG_HWINFO='no'            # run hwinfo for module-detection (requires bootparam 'hwinfo'!)
 CONFIG_HOTPLUG_BLACKLIST='no' # check for blacklist bootparam
 CONFIG_HOTPLUG_MAIN='no'      # start hotplug system [should be handled by udev now]
 CONFIG_HWINFO='no'            # run hwinfo for module-detection (requires bootparam 'hwinfo'!)
+CONFIG_HWSPEAK='yes'          # support for hardware synthesizer via speakup
 CONFIG_IPW3945='yes'          # check for broken ipw3945 module
 CONFIG_KERNEL='yes'           # display information on running kernel
 CONFIG_LANGUAGE='yes'         # allow language specification via commandline
 CONFIG_IPW3945='yes'          # check for broken ipw3945 module
 CONFIG_KERNEL='yes'           # display information on running kernel
 CONFIG_LANGUAGE='yes'         # allow language specification via commandline
index 5751634..ea88da1 100755 (executable)
@@ -4,7 +4,6 @@
 # Authors:       grml-team (grml.org), (c) Klaus Knopper <knopper@knopper.net>, (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
 # Authors:       grml-team (grml.org), (c) Klaus Knopper <knopper@knopper.net>, (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Fre Aug 15 23:06:21 CEST 2008 [mika]
 ################################################################################
 
 # {{{ path, variables, signals, umask, zsh
 ################################################################################
 
 # {{{ path, variables, signals, umask, zsh
@@ -819,27 +818,72 @@ fi
 
 # {{{ run software synthesizer via speakup
 config_swspeak(){
 
 # {{{ run software synthesizer via speakup
 config_swspeak(){
-if checkbootparam swspeak ; then
- if [ -d /proc/speakup/ ] ; then
-  einfo "Bootoption swspeak found. Kernel supports speakup." ; eend 0
-  eindent
-   if [ -x /etc/init.d/speech-dispatcher ] ; then
-     einfo "Starting speech-dispatcher."
-     /etc/init.d/speech-dispatcher start 1>>DEBUG ; eend $?
-     einfo "Activating sftsyn in Kernel."
-     echo sftsyn >/proc/speakup/synth_name ; eend $?
-     einfo "Just run swspeak if you want to use software synthesizer via speakup."
-     flite -o play -t "Finished activating software speakup. Just run swspeak when booting finished."
-   else
-    eerror "speech-dispatcher not available. swspeak will not work without it." ; eend 1
-    flite -o play -t "speech-dispatcher not available. speakup will not work without it."
+   if checkbootparam swspeak ; then
+      einfo "Bootoption swspeak found."
+
+      if ! [ -d /proc/speakup/ ] ; then
+         ewarn" Kernel does not support software speakup - trying to load kernel module:" ; eend 0
+         eindent
+         einfo "Loading speakup_soft"
+         if modprobe speakup_soft ; then
+            eend 0
+         else
+            flite -o play -t "Fatal error setting up software speakup"
+            eend 1
+            return 1
+         fi
+         eoutdent
+      fi
+
+      if [ -d /proc/speakup/ ] ; then
+         einfo "Kernel supports speakup." ; eend 0
+         eindent
+         if [ -x /etc/init.d/speech-dispatcher ] ; then
+            einfo "Starting speech-dispatcher."
+            /etc/init.d/speech-dispatcher start 1>>DEBUG ; eend $?
+            einfo "Activating sftsyn in Kernel."
+            echo sftsyn >/proc/speakup/synth_name ; eend $?
+            einfo "Just run swspeak if you want to use software synthesizer via speakup."
+            flite -o play -t "Finished activating software speakup. Just run swspeak when booting finished."
+         else
+            eerror "speech-dispatcher not available. swspeak will not work without it." ; eend 1
+            flite -o play -t "speech-dispatcher not available. speakup will not work without it."
+         fi
+         eoutdent
+      else
+         eerror "Kernel does not seem to support speakup. Skipping swspeak." ; eend 1
+         flite -o play -t "Kernel does not seem to support speakup. Sorry."
+      fi
+   fi
+}
+# }}}
+
+# {{{ support hardware synthesizer via speakup
+config_hwspeak(){
+   if checkbootparam hwspeak ; then
+      einfo "Bootoption hwspeak found."
+
+      if ! [ -d /proc/speakup/ ] ; then
+         ewarn" Kernel does not support hardware speakup - trying to load kernel modules:" ; eend 0
+         eindent
+         for module in $(find "/lib/modules/${KERNEL}/extra/speakup/" -name \*.ko | \
+                         sed 's#.*speakup/##g ; s#.ko$##g' | \
+                         grep -ve speakup_soft -ve speakup_dummy | sort -u) ; do
+            einfo "Trying to load $module"
+            modprobe $module
+            eend $?
+         done
+         eoutdent
+      fi
+
+      if [ -d /proc/speakup/ ] ; then
+         einfo "Kernel supports speakup now." ; eend 0
+         flite -o play -t "Kernel supports speakup now."
+      else
+         eerror "Kernel or hardware do not seem to support speakup. Skipping hwspeak." ; eend 1
+         flite -o play -t "Kernel or hardware do not seem to support speakup. Sorry."
+      fi
    fi
    fi
-  eoutdent
- else
-  eerror "Kernel does not seem to support speakup. Skipping swspeak." ; eend 1
-  flite -o play -t "Kernel does not seem to support speakup. Sorry."
- fi
-fi
 }
 # }}}
 
 }
 # }}}
 
index 5b68b34..65d589c 100644 (file)
@@ -3,7 +3,6 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Sat Mar 22 00:42:16 CET 2008 [mika]
 ################################################################################
 
 ################################################################################
 ################################################################################
 
 ################################################################################
@@ -80,6 +79,7 @@ CONFIG_HOTPLUG_AGENT='no'     # deactivate specific hotplug agent(s) via bootpar
 CONFIG_HOTPLUG_BLACKLIST='no' # check for blacklist bootparam
 CONFIG_HOTPLUG_MAIN='no'      # start hotplug system [should be handled by udev now]
 CONFIG_HWINFO='no'            # run hwinfo for module-detection (requires bootparam 'hwinfo'!)
 CONFIG_HOTPLUG_BLACKLIST='no' # check for blacklist bootparam
 CONFIG_HOTPLUG_MAIN='no'      # start hotplug system [should be handled by udev now]
 CONFIG_HWINFO='no'            # run hwinfo for module-detection (requires bootparam 'hwinfo'!)
+CONFIG_HWSPEAK='no'           # support for hardware synthesizer via speakup
 CONFIG_IPW3945='yes'          # check for broken ipw3945 module
 CONFIG_KERNEL='yes'           # display information on running kernel
 CONFIG_LANGUAGE='yes'         # allow language specification via commandline
 CONFIG_IPW3945='yes'          # check for broken ipw3945 module
 CONFIG_KERNEL='yes'           # display information on running kernel
 CONFIG_LANGUAGE='yes'         # allow language specification via commandline
index 6dba290..b953ff7 100644 (file)
@@ -3,8 +3,10 @@ grml-autoconfig (0.8.13) unstable; urgency=low
   * Use random password if bootoption 'ssh' doesn't have an option.
     Thanks to Michael Holzt and Marc Haber!
   * Update swedish language settings, thanks again to Martin Karresand.
   * Use random password if bootoption 'ssh' doesn't have an option.
     Thanks to Michael Holzt and Marc Haber!
   * Update swedish language settings, thanks again to Martin Karresand.
+  * Rework config_swspeak to support new speakup modules layout.
+  * Add config_hwspeak for supporting hardware speakup from userspace.
 
 
- -- Michael Prokop <mika@grml.org>  Thu, 25 Sep 2008 17:25:30 +0200
+ -- Michael Prokop <mika@grml.org>  Sat, 27 Sep 2008 14:27:20 +0200
 
 grml-autoconfig (0.8.12) unstable; urgency=low
 
 
 grml-autoconfig (0.8.12) unstable; urgency=low
 
index b6a5f91..92dd414 100755 (executable)
@@ -4,7 +4,6 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Son Jän 20 19:44:11 CET 2008 [mika]
 ################################################################################
 
 # http://wiki.debian.org/LSBInitScripts =>
 ################################################################################
 
 # http://wiki.debian.org/LSBInitScripts =>
@@ -111,6 +110,8 @@ checkvalue $CONFIG_LOG && config_log
 
 checkvalue $CONFIG_SWSPEAK && config_swspeak
 
 
 checkvalue $CONFIG_SWSPEAK && config_swspeak
 
+checkvalue $CONFIG_HWSPEAK && config_hwspeak
+
 checkvalue $CONFIG_FWTIMEOUT && config_fwtimeout
 
 checkvalue $CONFIG_FIX_PASSWD && config_fix_passwd
 checkvalue $CONFIG_FWTIMEOUT && config_fwtimeout
 
 checkvalue $CONFIG_FIX_PASSWD && config_fix_passwd
index 0af9cbd..6eeb8f9 100755 (executable)
@@ -4,7 +4,6 @@
 # Authors:       (c) Florian Keller <Florian.Keller@zuerich.ch>, (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
 # Authors:       (c) Florian Keller <Florian.Keller@zuerich.ch>, (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Mon Nov 06 23:04:08 CET 2006 [mika]
 ################################################################################
 
 if [ -z "$1" ] ; then
 ################################################################################
 
 if [ -z "$1" ] ; then
index 300d0e8..3a914c2 100644 (file)
@@ -3,7 +3,6 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Son Jul 01 22:55:38 CEST 2007 [mika]
 ################################################################################
 
 # The default language/keyboard to use. This CAN NOT be autoprobed.
 ################################################################################
 
 # The default language/keyboard to use. This CAN NOT be autoprobed.