That's not the entire script is it ? There is a 'fi' after that right ? and perhaps an 'exit 0' too ?
Does it work to make a script that just runs 'modprobe -r hci_usb' ? Does it give you the same error, or just the sequence there ?
Code:
modprobe -r rfcomm
modprobe -r hci_usb
modprobe -r l2cap
modprobe -r bluetooth
does the order of these make a difference ?
As for echoing things into '/proc' ... I don't think it's a good idea
, but whatever you wanna do.