From f5901da1b16f5e8ffc71298c2adade8c842328cf Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sat, 28 Apr 2007 17:33:36 +0200 Subject: [PATCH] bt-audio: use /etc/grml/script-functions, some more small improvements in status messages --- debian/changelog | 7 +++++++ usr_sbin/bt-audio | 21 ++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7e30f00..dcffaf4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +grml-scripts (0.9.45) unstable; urgency=low + + * bt-audio: use /etc/grml/script-functions, some more small + improvements in status messages. + + -- Michael Prokop Sat, 28 Apr 2007 17:32:47 +0200 + grml-scripts (0.9.44) unstable; urgency=low * Depend on libterm-readkey-perl as it is needed for grml-quickconfig. diff --git a/usr_sbin/bt-audio b/usr_sbin/bt-audio index a467179..b8ff03b 100755 --- a/usr_sbin/bt-audio +++ b/usr_sbin/bt-audio @@ -8,11 +8,9 @@ ################################################################################ . /etc/grml/lsb-functions +. /etc/grml/script-functions -if [ $UID != 0 ] ; then - eerror "Need root privileges. Please run $0 as user root." ; eend 1 - exit 1 -fi +check4root || exit 1 HCID_CONF='/etc/bluetooth/bt_headset.conf' [ -n "$PIN" ] || PIN='0000' @@ -22,7 +20,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 <