aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Müller2021-03-10 16:09:57 +0100
committerWolfgang Müller2021-03-10 16:09:57 +0100
commit736d17991fbe7aa468e62824b34c62396b01ab20 (patch)
tree8018ea55a15972b2f7f07fac2cf4e772bb667018
parent16dacd3fd1b70f7436426f096be1d88b5bb8f181 (diff)
downloadbosun-736d17991fbe7aa468e62824b34c62396b01ab20.tar.gz
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.
-rwxr-xr-xbosun8
1 files changed, 0 insertions, 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 "$@"