From 2512910567c874dc97e957675f8bfd3f94ff354d Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sun, 10 Jan 2010 16:13:24 +0100 Subject: [PATCH] Remove deprecated bt-audio script. --- debian/rules | 1 - manpages/grml-scripts.1 | 2 - usr_sbin/bt-audio | 203 ------------------------------------------------ 3 files changed, 206 deletions(-) delete mode 100755 usr_sbin/bt-audio diff --git a/debian/rules b/debian/rules index 774d35a..901a4b8 100755 --- a/debian/rules +++ b/debian/rules @@ -73,7 +73,6 @@ binary-arch: build install /usr/share/man/man1/grml-scripts.1.gz /usr/share/man/man1/bincompare.pl.1.gz \ /usr/share/man/man1/grml-scripts.1.gz /usr/share/man/man1/blacklist.1.gz \ /usr/share/man/man1/grml-scripts.1.gz /usr/share/man/man1/bt-hid.1.gz \ - /usr/share/man/man1/grml-scripts.1.gz /usr/share/man/man1/bt-audio.1.gz \ /usr/share/man/man1/grml-scripts.1.gz /usr/share/man/man1/caps-ctrl.1.gz \ /usr/share/man/man1/grml-scripts.1.gz /usr/share/man/man1/cicqhist.1.gz \ /usr/share/man/man1/grml-scripts.1.gz /usr/share/man/man1/code2color.1.gz \ diff --git a/manpages/grml-scripts.1 b/manpages/grml-scripts.1 index cb7db38..42e97c2 100644 --- a/manpages/grml-scripts.1 +++ b/manpages/grml-scripts.1 @@ -143,8 +143,6 @@ Start zsh using login-option through exec. .SS blacklist Blacklist module via module-init-tools (/etc/modprobe.d/grml). -.SS bt-audio -Connect audio bluetooth device (e.g. bluetooth headset) to local system. .SS bt-hid Connect human input device via bluetooth to local system. .SS dpkg_not_running diff --git a/usr_sbin/bt-audio b/usr_sbin/bt-audio deleted file mode 100755 index a6bc8c8..0000000 --- a/usr_sbin/bt-audio +++ /dev/null @@ -1,203 +0,0 @@ -#!/bin/sh -# Filename: bt-audio -# Purpose: connect bluetooth audio device (e.g. headset) to local system -# Authors: grml-team (grml.org), (c) Michael Prokop -# Bug-Reports: see http://grml.org/bugs/ -# License: This file is licensed under the GPL v2. -################################################################################ - -. /etc/grml/lsb-functions -. /etc/grml/script-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' - -case "$1" in - start) - einfo "Starting bluetooth support." - eindent - - if ! [ -r "$HCID_CONF" ] ; then - ewarn "$HCID_CONF does not exist. Setting it up." - cat > $HCID_CONF </dev/null; then - einfo "dbus already running." ; eend 0 - else - einfo "Starting dbus." - /etc/init.d/dbus start 1>/dev/null ; eend $? - fi - - if pgrep hcid 1>/dev/null; then - einfo "hicd already running." ; eend 0 - else - einfo "Starting hcid." - HCIINFO=$(mktemp) - if /usr/sbin/hcid -f $HCID_CONF 1>$HCIINFO 2>&1 ; then - rm -f $HCIINFO - eend 0 - else - eerror "hcid could not be started: `cat $HCIINFO`. Exiting." - rm -f $HCIINFO - eend 1 - exit 1 - fi - fi - - einfo "Loading bluetooth modules:" - for module in bluetooth ohci1394 hci_usb snd-bt-sco ; do - eindent - einfo "$module" ; modprobe $module ; eend $? - eoutdent - done - - einfo "Scanning for bluetooth audio device. Press the 'connect' button on the device!" - einfo "Scanning might take a while. Searching..." - SUCCESS=$(mktemp) - ERROR=$(mktemp) - - if hcitool scan 1>${SUCCESS} 2>${ERROR} ; then - if ! grep -q ':' $SUCCESS ; then - eerror "Could not find any devices. Exiting." ; eend 1 - exit 1 - else - ID=$(grep '[[:alnum:]][[:alnum:]]:' $SUCCESS | awk '{print $1}') - if [ -n "$ID" ] ; then - einfo "Success: connected device ${ID}." ; eend 0 - logger -t "bluez-connect" "connected human input device ${ID}" - btsco -v $ID 1>/dev/null & - # hcitool cc $ID - else - ewarn "Warning: searching for device succeded but no connection could be established." - fi - fi - else - eerror "Error: `cat $ERROR`" ; eend 1 - fi - - rm -f $SUCCESS $ERROR - ;; - stop) - HCIDAEMON=$(pgrep hcid) - if [ -n "$HCIDAEMON" ] ; then - einfo "Stopping hcid." - kill $HCIDAEMON - eend $? # workaround because start-stop-daemon does not work :-/ - else - einfo "No running hcid found, nothing to stop." - eend 0 - fi - - ewarn "Will not stop dbus as it might be used by other services." ; eend 0 - - einfo "Disconnecting all human input devices." - logger -t "bluez-connect" "disconnected all human input devices" - hidd --killall ; eend $? - ;; - restart|force-reload) - $0 stop - sleep 1 - $0 start - ;; - test) - if [ -r /usr/share/centericq/sms.wav ] ; then - einfo "Trying to play /usr/share/centericq/sms.wav on headset:" - echo -n " " - aplay -B 1000000 -D plughw:Headset /usr/share/centericq/sms.wav 1>/dev/null ; eend $? - else - eerror "/usr/share/centericq/sms.wav does not exist. Can not test sound." ; eend 1 - fi - ;; - status) - einfo "$0 - checking status:" - eindent - if pgrep hcid 1>/dev/null ; then - einfo "hcid running." ; eend 0 - if [ -d /proc/asound/Headset ] ; then - einfo "cat /proc/asound/Headset/*/info:" - cat /proc/asound/Headset/*/info ; eend $? - else - eerror "Directory /proc/asound/Headset does not exist." ; eend 1 - fi - else - eerror "hcid not running." ; eend 1 - fi - eoutdent - ;; - *) - echo "Usage: $0 {start|stop|status|restart|force-reload|test}" - exit 1 - ;; -esac - -eoutdent - -exit 0 - -## END OF FILE ################################################################# -- 2.1.4