How to ensure the bluetooth is switched off after boot up?
Note: I am unable to test this answer.
Assuming that you want to shut off bluetooth and not just the indicator light, the rfkill utility does what you want. The following command should disable bluetooth:
$ rfkill block bluetooth
In order to do this on every boot, this line can be placed in /etc/rc.local
, another custom init script, or (if available) an upstart script. I recommend using the full path of the executable inside /etc/rc.local
or in an custom init script. On my system this is /sbin/rfkill
, but can be found using the command which rfkill
. Thus on my system, I would place the following command within /etc/rc.local
somewhere before exit 0
:
/sbin/rfkill block bluetooth
Depending on your Debian setup, you may not have /etc/rc.local
. In this case, a custom init script may be the way to go. The init script could be saved at /etc/init.d/disable-bluetooth
and contain something like:
#!/bin/sh
/sbin/rfkill block bluetooth
Then ensure the command is executable (chmod 755
) and add it to startup (update-rc.d disable-bluetooth defaults
).
An example of an upstart upstart script would be a file named /etc/init/disable-bluetooth.conf
containing something like:
description "Disable Bluetooth devices"
start on startup
task
exec /sbin/rfkill block bluetooth
rfkill
uses /dev/rfkill
which is an interface provided by the Linux kernel.