A udev rule starts the hampack-radio-plugged user service when a USB serial port appears, and it runs `radio configure --auto`. That sets up a radio recognised by its USB serial number, unless the radio set up already is plugged in, and says what it did in a desktop notification. It never asks a radio what it is, since that may key the transmitter, and never asks for sudo, so a running Graywolf is skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 lines
542 B
Plaintext
9 lines
542 B
Plaintext
# Set up a radio when it's plugged in. Each USB serial port that appears
|
|
# starts the hampack-radio-plugged systemd user service (which HamPack's
|
|
# update installs), and it runs `radio configure --auto`. That sets up only a
|
|
# radio `radio` recognises by its USB serial number, and only if the radio
|
|
# set up already isn't plugged in. To turn it off:
|
|
# systemctl --user mask hampack-radio-plugged
|
|
|
|
ACTION=="add", SUBSYSTEM=="tty", KERNEL=="ttyUSB[0-9]*|ttyACM[0-9]*", TAG+="systemd", ENV{SYSTEMD_USER_WANTS}+="hampack-radio-plugged.service"
|