In fact ThinkPad T60 has both these switches. In BIOS there is Internal Bluetooth Device switch in Network section and on the keyboard there is function key Fn+F5 to toggle WiFi and Bluetooth devices.
On my machine BIOS option for Bluetooth was enabled and Fn+F5 key didn't work in Linux. I didn't configure it because Bluetooth worked out of the box.
A few weeks ago I installed on my machine Windows XP. I needed it for testing purposes. Now I inspected it and I stated Windows switches Bluetooth off on exit. I tried to find that switch but I failed.
So I returned to Linux and I prepared two files.
In /etc/acpi/actions/ directory I put bluetooth.sh script:
Code:
#!/bin/sh
if [ "`head -n 1 /proc/acpi/ibm/bluetooth | cut -f 3`" == "disabled" ]
then
echo enable > /proc/acpi/ibm/bluetooth
else
echo disable > /proc/acpi/ibm/bluetooth
fi
/etc/rc.d/rc.bluetooth restart
In /etc/acpi/events/ directory I put bluetooth file:
Code:
event=ibm/hotkey HKEY 00000080 00001005
action=/etc/acpi/actions/bluetooth.sh
After /etc/rc.d/rc.acpid restart command I can now switch on and off Bluetooth device.
Thank you MS3FGX for your tips. It moved me in the correct direction.