bt-audio: check for presence of snd-bt-sco 1.1.2
authorMichael Prokop <mika@grml.org>
Mon, 14 Jan 2008 19:37:35 +0000 (20:37 +0100)
committerMichael Prokop <mika@grml.org>
Mon, 14 Jan 2008 19:37:35 +0000 (20:37 +0100)
debian/changelog
usr_sbin/bt-audio

index 4139e11..e20f8ca 100644 (file)
@@ -1,3 +1,10 @@
+grml-scripts (1.1.2) unstable; urgency=low
+
+  * bt-audio: check for presence of snd-bt-sco and provide an
+    informational error message if it isn't present.
+
+ -- Michael Prokop <mika@grml.org>  Mon, 14 Jan 2008 20:36:33 +0100
+
 grml-scripts (1.1.1) unstable; urgency=low
 
   * zsh-login: display version information depending on the present
index b8ff03b..d06638a 100755 (executable)
@@ -4,7 +4,7 @@
 # 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 Aug 06 20:30:34 CEST 2006 [mika]
+# Latest change: Mon Jän 14 20:36:21 CET 2008 [mika]
 ################################################################################
 
 . /etc/grml/lsb-functions
 
 check4root || exit 1
 
+if ! modprobe -l | grep snd-bt-sco ; then
+   eerror "Sorry, could not find kernel module snd-bt-sco. Exiting." ; eend 1
+   ewarn "The kernel version you are using either does not support the snd-bt-sco module..."
+   ewarn "... yet or you should take a look at Debian package bluez-audio."
+   exit 1
+fi
+
 HCID_CONF='/etc/bluetooth/bt_headset.conf'
 [ -n "$PIN" ] || PIN='0000'