Rework /proc stuff of speakup
authorMichael Prokop <devnull@localhost>
Sat, 27 Sep 2008 14:34:18 +0000 (16:34 +0200)
committerMichael Prokop <devnull@localhost>
Sat, 27 Sep 2008 14:34:18 +0000 (16:34 +0200)
autoconfig.functions
debian/changelog

index 936a94a..7af72a2 100755 (executable)
@@ -846,8 +846,15 @@ config_swspeak(){
          if [ -x /etc/init.d/speech-dispatcher ] ; then
             einfo "Starting speech-dispatcher."
             /etc/init.d/speech-dispatcher start 1>>DEBUG ; eend $?
          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 $?
+            if [ -r /proc/speakup/synth_name ] ; then
+               einfo "Activating sftsyn via /proc in Kernel."
+               echo sftsyn > /proc/speakup/synth_name ; eend $?
+            elif [ -r /sys/modules/speakup/parameters/synth ] ; then
+               einfo "Activating sftsyn via /sys in Kernel."
+               echo sftsyn > /sys/modules/speakup/parameters/synth ; eend $?
+            else
+               eerror "Error when configuring sftsyn via /proc or /sys." ; eend 1
+            fi
             einfo "Just run swspeak if you want to use software synthesizer via speakup."
             flitewrapper "Finished activating software speakup. Just run swspeak when booting finished."
          else
             einfo "Just run swspeak if you want to use software synthesizer via speakup."
             flitewrapper "Finished activating software speakup. Just run swspeak when booting finished."
          else
index cf6bd7a..e135ace 100644 (file)
@@ -7,7 +7,7 @@ grml-autoconfig (0.8.13) unstable; urgency=low
   * Add config_hwspeak for supporting hardware speakup from userspace.
   * Wrap flite calls through a wrapper function.
 
   * Add config_hwspeak for supporting hardware speakup from userspace.
   * Wrap flite calls through a wrapper function.
 
- -- Michael Prokop <mika@grml.org>  Sat, 27 Sep 2008 16:11:53 +0200
+ -- Michael Prokop <mika@grml.org>  Sat, 27 Sep 2008 16:34:03 +0200
 
 grml-autoconfig (0.8.12) unstable; urgency=low
 
 
 grml-autoconfig (0.8.12) unstable; urgency=low