udev: split wifi and bt rules into two separate files, add systemd unit file, and add BT mac retry
- Jan 23, 2025
-
-
Clayton Craft authored
If bootmac is running under systemd, sending output to `logger` usually means that the output is not sent to journald, and is lost. This can make debug more difficult. The var tested here is one that systemd sets when running a daemon (see `man systemd.exec`.)
-
Clayton Craft authored
This replaces 3bfb183f with a retry mechanism, where the BT and wlan mac is (re)tried every 1 second for up to 5 seconds (configurable). If this doesn't play nicely with udev rules when using RUN, then BT_TIMEOUT and/or WLAN_TIMEOUT can be set in the env.
-
Clayton Craft authored
Being part of the bluetooth.target means that this service (if enabled) is started automatically every time the bluetooth service is (re)started. WiFi was skipped since I've not found a reliable way to have bootmac configure the mac, it's racing with the driver, NM, and iwd/wpa_supplicant. The udev rule for wifi should just be dropped altogether when packaging bootmac for a systemd OS since it's unreliable and buggy.
-
- Jan 15, 2025
-
-
Clayton Craft authored
The udev rule for bluetooth doesn't work on systemd[1], by splitting the rule into two separate rules, distros can leave this bluetooth rule out when packaging for systemd. Distros packaging bootmac will have to make note of the new rule files/names. 1. https://github.com/systemd/systemd/issues/35003
-