From: Michael Prokop Date: Sat, 27 Sep 2008 12:29:54 +0000 (+0200) Subject: Rework config_swspeak, add config_hwspeak X-Git-Tag: 0.8.13~4 X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=commitdiff_plain;h=8328ba1e87429b4bdff9c7a686ea39c5c6a0d048 Rework config_swspeak, add config_hwspeak --- diff --git a/autoconfig b/autoconfig index ad64265..bef518a 100644 --- a/autoconfig +++ b/autoconfig @@ -3,7 +3,6 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # 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_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 diff --git a/autoconfig.functions b/autoconfig.functions index 5751634..ea88da1 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -4,7 +4,6 @@ # Authors: grml-team (grml.org), (c) Klaus Knopper , (c) Michael Prokop # 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 @@ -819,27 +818,72 @@ fi # {{{ 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 - 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 } # }}} diff --git a/autoconfig.small b/autoconfig.small index 5b68b34..65d589c 100644 --- a/autoconfig.small +++ b/autoconfig.small @@ -3,7 +3,6 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # 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_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 diff --git a/debian/changelog b/debian/changelog index 6dba290..b953ff7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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. + * Rework config_swspeak to support new speakup modules layout. + * Add config_hwspeak for supporting hardware speakup from userspace. - -- Michael Prokop Thu, 25 Sep 2008 17:25:30 +0200 + -- Michael Prokop Sat, 27 Sep 2008 14:27:20 +0200 grml-autoconfig (0.8.12) unstable; urgency=low diff --git a/grml-autoconfig b/grml-autoconfig index b6a5f91..92dd414 100755 --- a/grml-autoconfig +++ b/grml-autoconfig @@ -4,7 +4,6 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # 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 => @@ -111,6 +110,8 @@ checkvalue $CONFIG_LOG && config_log checkvalue $CONFIG_SWSPEAK && config_swspeak +checkvalue $CONFIG_HWSPEAK && config_hwspeak + checkvalue $CONFIG_FWTIMEOUT && config_fwtimeout checkvalue $CONFIG_FIX_PASSWD && config_fix_passwd diff --git a/grml-bootsplash b/grml-bootsplash index 0af9cbd..6eeb8f9 100755 --- a/grml-bootsplash +++ b/grml-bootsplash @@ -4,7 +4,6 @@ # Authors: (c) Florian Keller , (c) Michael Prokop # 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 diff --git a/language-functions b/language-functions index 300d0e8..3a914c2 100644 --- a/language-functions +++ b/language-functions @@ -3,7 +3,6 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # 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.