# /etc/rc.d/bluetooth - enable or disable variable?



## tingo (Sep 13, 2017)

When I run the bluetooth script I notice it doesn't have any variables:

```
root@www# service bluetooth rcvar
# bluetooth
#
```
compare to another random service

```
root@www# service ntpd rcvar
# ntpd
#
ntpd_enable="YES"
#   (default: "")
```
so, most other services have an "enable" variable that I can put in /etc/rc.conf to enable or disable that service. For some reason, bluetooth doesn't.

Today, when bluetooth exists on lots of machines that might be used as servers (even on Raspberry Pis), we should have a way to easily disable bluetooth if it isn't used.

I searched open bug reports with "bluetooth", but didn't find anything about this.


----------



## SirDice (Sep 13, 2017)

There appears to be something missing:

```
name="bluetooth"
rcvar=
start_cmd="bluetooth_start"
stop_cmd="bluetooth_stop"
required_modules="ng_bluetooth ng_hci ng_l2cap ng_btsocket"
```
The rcvar should contain bluetooth_enable.

Oddly enough it appears to be missing from /etc/default/rc.conf too.


----------

