mirror of
https://github.com/ergosteur/ergo-proxmox-scripts.git
synced 2026-10-28 13:00:37 -04:00
It was meant to restart the NUT driver from a udev RUN+= when the UPS re-enumerates on USB, but was never wired up: 50-nut-ups.rules only sets MODE and GROUP. systemd already covers the case. nut-driver@ups.service is Restart=always with RestartUSec=15s, so the driver is retried indefinitely and reattaches to a new device node unaided. It would also not have worked reliably. systemd-udevd kills RUN+= handlers still alive when the event completes, so the backgrounded subshell could be killed mid-sleep, and upsdrvctl would run the driver outside the unit's supervision, competing with systemd's own restarts. Kept with a header recording the rule-based alternative if faster recovery is ever wanted. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>