diff --git a/PLAN.md b/PLAN.md index de61477..1a85734 100644 --- a/PLAN.md +++ b/PLAN.md @@ -21,9 +21,3 @@ control a radio, with rigctld started when the radio is plugged in. already lets you open the card's `hidraw` device - [ ] Later: run `radio configure` when a known radio is plugged in (a udev rule starting a systemd user unit) - -## Other - -- [ ] Graywolf's setup (`install_graywolf_service` in `update.sh`) creates a - `dialout` group, which nothing on Arch uses. Its service runs as you, - so it already has your uucp membership. Drop the `groupadd` diff --git a/tests/helpers.bash b/tests/helpers.bash index d27b3b3..0a8b3e0 100644 --- a/tests/helpers.bash +++ b/tests/helpers.bash @@ -25,7 +25,7 @@ setup_fake_home() { # Commands that just log and succeed local cmd - for cmd in systemctl udevadm groupadd yay update-desktop-database update-mime-database \ + for cmd in systemctl udevadm yay update-desktop-database update-mime-database \ xdg-icon-resource xdg-desktop-menu wine wineboot winetricks xdotool; do stub "$cmd" 'exit 0' done diff --git a/tests/update.bats b/tests/update.bats index 2853183..437d470 100644 --- a/tests/update.bats +++ b/tests/update.bats @@ -136,6 +136,8 @@ setup() { [ "$status" -eq 0 ] grep -qx "sudo tee /etc/systemd/system/graywolf.service" "$STUB_LOG" grep -qx "enable_services graywolf" "$STUB_LOG" + # It runs as you, with your groups: it needs no group of its own + ! grep -q "groupadd" "$STUB_LOG" } @test "the graywolf web UI listens only on this machine" { diff --git a/update.sh b/update.sh index b9f976e..b957feb 100644 --- a/update.sh +++ b/update.sh @@ -151,7 +151,6 @@ install_graywolf_service() { local unit=/etc/systemd/system/graywolf.service rendered rendered="$(sed "s|HAMPACK_USER|$USER|g; s|HAMPACK_HOME|$HOME|g" "$SELF/systemd/graywolf.service")" mkdir -p "$HOME/.local/share/graywolf" - getent group dialout > /dev/null || sudo groupadd dialout || return 1 if [ "$(cat "$unit" 2> /dev/null)" != "$rendered" ]; then echo "Installing $unit..."