From 736d17991fbe7aa468e62824b34c62396b01ab20 Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Wed, 10 Mar 2021 16:09:57 +0100 Subject: Remove the test for superuser access As bosun may run in environments that do not require superuser access, do away with this check and rely on stow itself for any relevant error reporting. This will also enable an upcoming test suite to work correctly. --- bosun | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bosun b/bosun index 08f1842..d9dc4c7 100755 --- a/bosun +++ b/bosun @@ -27,29 +27,21 @@ need_role() { done } -need_root() { - test "$(id -u)" -eq 0 || errx "this action requires superuser access" -} - add() { - need_root need_role "$@" stow -S "$@" } remove() { - need_root need_role "$@" stow -D "$@" } flush() { - need_root list | xargs -- stow -D } rebuild() { - need_root if test $# -gt 0; then need_role "$@" stow -R "$@" -- cgit v1.2.3-2-gb3c3