#567640 bluez: init script fails trying to write to /sys/class/rfkill/rfkill1/state

Package:
bluez
Source:
bluez
Description:
Bluetooth tools and daemons
Submitter:
Guus Sliepen
Date:
2010-09-03 21:18:05 UTC
Severity:
important
#567640#5
Date:
2010-01-30 11:57:34 UTC
From:
To:
The bluez package fails to upgrade properly on my system, and would otherwise
give problems when booting on some systems:

Starting bluetooth:/etc/init.d/bluetooth: 199: cannot create /sys/class/rfkill/rfkill1/state: Directory nonexistent
invoke-rc.d: initscript bluetooth, action "start" failed.

The /etc/init.d/bluetooth script contains this line:

	echo 1 >/sys/class/rfkill/rfkill1/state

This fails if that file does not exist, for example if there is no rfkill
function for a bluetooth device, or a bluetooth device is not plugged in when
booting, or if the bluetooth rfkill switch has a different name than rfkill1.
Also, there could be more than one bluetooth device, in which case not all of
them are switched on, or another device (a wifi card for example) could use
rfkill1, or maybe the user only wants to turn it on/off manually when
necessary.  In short, I think it's a bad idea to try to write to rfkill state
files in the bluetooth init script.

#567640#10
Date:
2010-09-03 21:15:52 UTC
From:
To:
tags 567640 + moreinfo
thanks

Hi,

I can not find this line from /etc/init.d/bluetooth.

But when there is this line in /etc/init.d/bluetooth and there is not
/sys/class/rfkill/rfkill1/state,
 it will become the error.

Does the same problem happen with 4.69-1?
Would you check it?

Best regards,
  Nobuhiro