You are not logged in.

#1 2016-09-23 15:25:26

alvaro
Member
Registered: 2016-09-23
Posts: 1

Bluetooth with openrc

After installing succesfully archbang i didnt managed to make bluetooth work because all applications use a daemon which have no openrc scripts. Since no package offered an acurate openrc script, i wrote those:

/etc/init.d/bluetooth

 #!/usr/bin/openrc-run

 BTD=/usr/lib/bluetooth/bluetoothd 
 PID=/var/run/bluetoothd.pid

 depend() {
    before xdm
    need dbus localmount hostname
 }

 start() {
   ebegin "Enabling Bluetooth"
   start-stop-daemon --start --background --make-pidfile --pidfile $PID --exec $BTD
   eend $?
 }

 stop() {
   start-stop-daemon --stop --pidfile $PID
   eend $?
 }

/etc/udev/rules.d/90-bluetooth.rules

 # Enable the Bluetooth controller

 ACTION=="add", KERNEL=="hci0", TEST=="/usr/sbin/hciconfig", RUN+="/usr/sbin/hciconfig hci0 up"

to enable the daemon, add it to the default rc level with

rc-update add bluetooth

Offline

#2 2016-09-23 23:55:40

Mr Green
Administrator
Registered: 2010-11-07
Posts: 6,694

Re: Bluetooth with openrc

Thanks for sharing wink

Welcome to ArchBang


Comments, suggestions, donations please feel free to contact me mrgreen(at)archbang(dot)org

Offline

#3 2016-09-24 13:21:41

Chris Cromer
Member
Registered: 2016-06-12
Posts: 23

Re: Bluetooth with openrc

The package for bluetooth in openrc already exists and is in the repos. It is called bluez-openrc which is also the name of the package for bluetooth in arch linux: https://wiki.archlinux.org/index.php/Bluetooth

As you can see to install bluetooth in arch linux, you install the package "bluez", then for the openrc script install "bluez-openrc".

But thanks for the help, if you do find any packages that are missing openrc scripts, feel free to let me know and I will add them to the repo.

Offline

Board footer

Powered by FluxBB