offa / plug

Software for Fender Mustang Amps.
GNU General Public License v3.0
54 stars 20 forks source link

Improve udev rules, add uaccess support #11

Closed StefanBruens closed 2 years ago

StefanBruens commented 2 years ago

As rules are evaluated at system startup (coldplug), rules should be skipped when they don't apply to avoid wasting time. Use same pattern as other rule files, and evaluate SUBSYSTEM just once.

Also follow common pattern of assigning an ID variable, and evaluate it later for for granting access (see systemd-udev upstream "70-uaccess.rules").

Provide to rules actually granting access, one using plugdev group (Debian specific, for backwards compatibility), and one upstream method with ACLs (uaccess).

offa commented 2 years ago

Thanks! :+1: