X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_sbin%2Fbt-audio;h=b8ff03b7365127980d80b98ecaf4bc43e13bdc8f;hb=ae1b256efa526deed800fef5a985ece7749020bf;hp=a467179fa77bb1f5bf6ba90e30f45e722766f2d7;hpb=e720deae78f1eda5e6f62629606c194f16796762;p=grml-scripts.git 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 <