Add radio, which finds radios on USB, and put you in the uucp group
`radio` lists each radio plugged into USB: its serial ports, the sound card that came with it (the same USB device, or behind the radio's own hub), and its model and Hamlib model number. Icoms are recognised by their USB serial number. `radio detect --probe` asks the others with the CAT ID; command or Icom's CI-V transceiver ID, at the usual baud rates, on ports no other program has open; `radio probe PORT` asks one port. It drops DTR and RTS as soon as a port opens. The radios it knows are in radios.conf. update.sh links ~/.local/bin/radio to the clone, unless a different radio is already there, and adds you to uucp, which owns serial ports on Arch. hampackremove removes the link, and takes you out of uucp only if HamPack put you in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
48d94ca432
commit
6c76f94ac6
@@ -33,6 +33,19 @@ setup_fake_home() {
|
||||
case "$1" in -v|-n) exit 0 ;; esac
|
||||
if [ -x "$STUB_DIR/$1" ]; then "$@"; else exit 0; fi'
|
||||
|
||||
# Fake group database: the groups you're in, one per line, in $FAKE_GROUPS.
|
||||
# `id -nG` (this login's groups) reads $FAKE_SESSION_GROUPS if set, as a
|
||||
# login from before usermod would
|
||||
export FAKE_GROUPS="$BATS_TEST_TMPDIR/groups"
|
||||
unset FAKE_SESSION_GROUPS
|
||||
: > "$FAKE_GROUPS"
|
||||
stub id '
|
||||
[ "$1" = -nG ] || exit 1
|
||||
if [ -n "$2" ]; then groups="$FAKE_GROUPS"; else groups="${FAKE_SESSION_GROUPS:-$FAKE_GROUPS}"; fi
|
||||
echo "$USER" $(cat "$groups")'
|
||||
stub usermod '[ "$1" = -aG ] && echo "$2" >> "$FAKE_GROUPS"'
|
||||
stub gpasswd '[ "$1" = -d ] && grep -vx "$3" "$FAKE_GROUPS" > "$FAKE_GROUPS.new"; mv "$FAKE_GROUPS.new" "$FAKE_GROUPS"'
|
||||
|
||||
stub pacman '
|
||||
case "$1" in
|
||||
-Qi|-Q|-Qq)
|
||||
|
||||
Reference in New Issue
Block a user