I have a problem that would have been simple in the good old days of BSD Init or SystemV, but that looks a bit more complex with systemd. Here goes.
I have to run the following command at boot time, roughly after
bluetooth.service has started and before SDDM is loading:
bluetoothctl connect 00:26:BB:7F:A3:07
Up until RHEL 6.x I simply would have put this command along with its arguments in
/etc/rc.d/rc.local, and this would be the end of it.
What’s the orthodox way to do this with systemd ?
Albeit your concrete issue. Its still possible to use
/etc/rc.d/rc.local to activate it:
chmod +x /etc/rc.d/rc.local
The question was how to do this in systemd. The closest you’ll get is a “oneshot” service unit in
OK, so I experimented a bit, and here’s a crisp and clean solution for my problem:
You could add
[Service]. Then the state would not go to “dead”.
Unfortunately the mouse won’t connect with this variant.