I need to apply a patch ram to a chip for Bluetooth on startup of a Debian linux. This patch uses /dev/mem
to reset the GPIO. This updated init script for bluetooth is included in /etc/init.d/bluetooth
.
My bluetooth.service
is
[Unit]
Description=Bluetooth service
Documentation=man:bluetoothd(8)
[Service]
Type=dbus
BusName=org.bluez
ExecStart=/etc/init.d/bluetooth start
User=root
NotifyAccess=main
[Install]
WantedBy=bluetooth.target
Alias=dbus-org.bluez.service
However, when I reboot, I get an error saying `Unable to open /dev/mem: Operation not permitted"
I understand that /dev/mem
is only accessible to root, but aren't I running my init script as root?