X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_sbin%2Fbt-audio;h=d06638ab6214f5e314d22754a3d7a4e498df8c1b;hb=3bfbb79eef6cca9c40a63a8ea0ab86b421b72eee;hp=a467179fa77bb1f5bf6ba90e30f45e722766f2d7;hpb=e720deae78f1eda5e6f62629606c194f16796762;p=grml-scripts.git diff --git a/usr_sbin/bt-audio b/usr_sbin/bt-audio index a467179..d06638a 100755 --- a/usr_sbin/bt-audio +++ b/usr_sbin/bt-audio @@ -4,13 +4,18 @@ # 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 +. /etc/grml/script-functions -if [ $UID != 0 ] ; then - eerror "Need root privileges. Please run $0 as user root." ; eend 1 +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 @@ -22,7 +27,7 @@ case "$1" in einfo "Starting bluetooth support." eindent - if ! [ -r $HCID_CONF ] ; then + if ! [ -r "$HCID_CONF" ] ; then ewarn "$HCID_CONF does not exist. Setting it up." cat > $HCID_CONF <