Remove all bashisms; drop grml-muttng
[grml-scripts-core.git] / usr_sbin / bt-audio
index b8ff03b..a6bc8c8 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.
-# Latest change: Son Aug 06 20:30:34 CEST 2006 [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'