From e0a12bd3e2415e73e0a49c7df264cef1786daca1 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 14 Jan 2008 20:37:35 +0100 Subject: [PATCH] bt-audio: check for presence of snd-bt-sco --- debian/changelog | 7 +++++++ usr_sbin/bt-audio | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 4139e11..e20f8ca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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 diff --git a/usr_sbin/bt-audio b/usr_sbin/bt-audio index b8ff03b..d06638a 100755 --- a/usr_sbin/bt-audio +++ b/usr_sbin/bt-audio @@ -4,7 +4,7 @@ # 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 Aug 06 20:30:34 CEST 2006 [mika] +# Latest change: Mon Jän 14 20:36:21 CET 2008 [mika] ################################################################################ . /etc/grml/lsb-functions @@ -12,6 +12,13 @@ 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' -- 2.1.4