fix bluetooth init script

This commit is contained in:
Calin Crisan 2017-05-06 20:30:09 +03:00
parent 42538f2142
commit 406aad843f

View File

@ -30,11 +30,6 @@ configure() {
# bring adapter up # bring adapter up
hciconfig $hci up hciconfig $hci up
# if DiscoverableTimeout is set to 0, make adapter is discoverable from boot time
if grep -E '^DiscoverableTimeout\s*=\s*0$' $run_conf &>/dev/null; then
hciconfig $hci piscan
fi
} }
start() { start() {
@ -59,10 +54,16 @@ start() {
msg_fail msg_fail
return 1 return 1
fi fi
msg_begin "Starting bluetoothd" msg_begin "Starting bluetoothd"
/usr/libexec/bluetooth/bluetoothd &>/dev/null & $bluetoothd &>/dev/null &
msg_done msg_done
# if DiscoverableTimeout is set to 0, make adapter discoverable from boot time
if grep -E '^DiscoverableTimeout\s*=\s*0$' $run_conf &>/dev/null; then
sleep 1
hciconfig $hci piscan
fi
} }
stop() { stop() {