Skip to content

Commit

Permalink
Revert "fix pkg preinstall scripts to actually check for the 'admin' …
Browse files Browse the repository at this point in the history
…group not the 'staff' group"

This reverts commit 063a4b5.
  • Loading branch information
rentzsch committed Aug 28, 2009
1 parent 998e3aa commit 5c8b57b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Expand Up @@ -2,7 +2,7 @@
cd "`dirname \"$0\"`"
SCRIPT_WD=`pwd`
DIR=/Library/Receipts/clicktoflash-nonadmin.pkg/
SOME_GROUPS=`id -G $USER`
GROUPS=`id -Gn $USER`


# 1 is a successful result, and requires installation with an admin password; if the result is 0, this package is unavailable
Expand All @@ -28,9 +28,14 @@ if [ -d $DIR ]; then
exit 0
fi

if echo "$SOME_GROUPS" | egrep "^80$|^80 | 80$| 80 " > /dev/null; then
if [ "$GROUPS" == "20" ]; then
echo "User has admin privs, no admin privs required for installer pkg."
exit 0
else
if [[ "$GROUPS" =~ " 20 " ]]; then
echo "User has admin privs, no admin privs required for installer pkg."
exit 0
fi
fi

echo "No receipt, no admin privs, installer must ask for admin password."
Expand Down
Expand Up @@ -2,7 +2,7 @@
cd "`dirname \"$0\"`"
SCRIPT_WD=`pwd`
DIR=/Library/Receipts/clicktoflash-nonadmin.pkg/
SOME_GROUPS=`id -G $USER`
GROUPS=`id -Gn $USER`


# 1 is a successful result, and allows installation without an admin password; if the result is 0, this package is unavailable
Expand All @@ -28,9 +28,14 @@ if [ -d $DIR ]; then
exit 1
fi

if echo "$SOME_GROUPS" | egrep "^80$|^80 | 80$| 80 " > /dev/null; then
if [ "$GROUPS" == "20" ]; then
echo "User has admin privs, no admin privs required for installer pkg."
exit 1
else
if [[ "$GROUPS" =~ " 20 " ]]; then
echo "User has admin privs, no admin privs required for installer pkg."
exit 1
fi
fi

echo "No receipt, no admin privs, installer must ask for admin password."
Expand Down

0 comments on commit 5c8b57b

Please sign in to comment.