udev: split wifi and bt rules into two separate files, add systemd unit file, and add BT mac retry
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.
This also includes a systemd unit file that can be used to autostart bootmac when bluetooth stuff is starting up (e.g. when the adapter is available), and provides a nicer way to add delays instead of trying to delay udev scripts, scripts that take 'too long' for udev can cause problems.
Merge request reports
Activity
mentioned in commit pmaports@96de2b48
mentioned in merge request pmaports!6050 (merged)
mentioned in commit pmaports@49b178bc
- Resolved by Dylan Van Assche
- Resolved by Clayton Craft
added 2 commits
added 2 commits
mentioned in commit pmaports@e8c8d548
mentioned in commit pmaports@18347d65
mentioned in commit pmaports@48d308b8
- Resolved by Clayton Craft
- Resolved by Clayton Craft
I tried this on systemd with GNOME Mobile with SHIFT6mq, but I have no luck it seems:
● bootmac.service - Set Mac Address Loaded: loaded (/etc/systemd/system/bootmac.service; enabled; preset: disabled) Active: active (exited) since Sun 2025-01-19 20:10:24 CET; 10s ago Invocation: dbbbad44ba5946b2997d9ba4dae39821 Process: 2578 ExecStart=/usr/bin/bootmac --bluetooth (code=exited, status=0/SUCCESS) Main PID: 2578 (code=exited, status=0/SUCCESS) Mem peak: 3.1M CPU: 82ms Jan 19 20:10:24 shift-axolotl systemd[1]: Starting Set Mac Address... Jan 19 20:10:24 shift-axolotl bootmac[2617]: Set Powered for hci0 failed with status 0x11 (Invalid Index) Jan 19 20:10:24 shift-axolotl bootmac[2617]: Jan 19 20:10:24 shift-axolotl bootmac[2616]: yes: : Broken pipe Jan 19 20:10:24 shift-axolotl bootmac[2621]: hci0 Set Public Address complete, options: Jan 19 20:10:24 shift-axolotl bootmac[2620]: yes: : Broken pipe Jan 19 20:10:24 shift-axolotl bootmac[2628]: Set Powered for hci0 failed with status 0x11 (Invalid Index) Jan 19 20:10:24 shift-axolotl bootmac[2628]: Jan 19 20:10:24 shift-axolotl bootmac[2627]: yes: : Broken pipe Jan 19 20:10:24 shift-axolotl systemd[1]: Finished Set Mac Address.
Problem is also that
bluetoothctl
does not even see the Bluetooth controller. Might be a kernel issue. Therefore, I cannot really verify myself if this patch works. But if you check if it works on OpenRC and systemd, I can merge this easily.
added 2 commits
added 1 commit
- 1ac151a8 - Add retry mechnism for setting BT and wlan MAC addr