Update issourcezap-member

This commit is contained in:
0x1eef 2024-06-01 01:17:28 -03:00
parent 46c5110070
commit 1210a81807
4 changed files with 8 additions and 11 deletions

View file

@ -32,7 +32,7 @@ if [ "$(id -u)" = "0" ]; then
exit 1 exit 1
fi fi
if ! "${libexec}"/utils/issourcezap-member; then if ! "${libexec}"/utils/issourcezap-member > /dev/null 2>&1; then
printerr "$(id -un) is not a member of _sourcezap" printerr "$(id -un) is not a member of _sourcezap"
exit 1 exit 1
fi fi

View file

@ -33,7 +33,7 @@ if [ "$(id -u)" = "0" ]; then
exit 1 exit 1
fi fi
if ! "${libexec}"/utils/issourcezap-member; then if ! "${libexec}"/utils/issourcezap-member > /dev/null >2&1; then
printerr "$(id -un) is not a member of _sourcezap" printerr "$(id -un) is not a member of _sourcezap"
exit 1 exit 1
fi fi

View file

@ -31,7 +31,7 @@ if [ "$(id -u)" = "0" ]; then
exit 1 exit 1
fi fi
if ! "${libexec}"/utils/issourcezap-member; then if ! "${libexec}"/utils/issourcezap-member > /dev/null 2>&1; then
printerr "$(id -un) is not a member of _sourcezap" printerr "$(id -un) is not a member of _sourcezap"
exit 1 exit 1
fi fi

View file

@ -1,12 +1,9 @@
#!/bin/sh #!/bin/sh
set -e set -e
##
# main
group="_sourcezap" group="_sourcezap"
if id -Gn | \ mygroups=$(id -Gn | tr ' ' '\n')
tr ' ' '\n' | \ echo "${mygroups}" | grep -e "^${group}$"
grep -e "^${group}$" \ exit "${?}"
> /dev/null 2>&1; then
exit 0
else
exit 1
fi