From 84c63bec47236c45fa436136b92fa38e0078129f Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Wed, 26 Jul 2006 12:47:52 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=10760 --- mac_build/Mac_SA_Secure.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mac_build/Mac_SA_Secure.sh b/mac_build/Mac_SA_Secure.sh index 787b500cf3..e783a4b2ab 100755 --- a/mac_build/Mac_SA_Secure.sh +++ b/mac_build/Mac_SA_Secure.sh @@ -37,7 +37,9 @@ function make_boinc_user() { # Check whether group already exists name=$(dscl . search /groups RecordName $1 | cut -f1 -) - if [ "$name" != "$1" ] ; then + if [ "$name" = "$1" ] ; then + gid=$(dscl . read /groups/$1 PrimaryGroupID | cut -d" " -f2 -) + else # Find an unused group ID gid="25" while true; do @@ -50,10 +52,10 @@ function make_boinc_user() { dscl . -create /groups/$1 dscl . -create /groups/$1 gid $gid fi - + # Check whether user already exists name=$(dscl . search /users RecordName $1 | cut -f1 -) - if [ "$name" != "$1" ] ; then + if [ -z "$name" ] ; then # Is uid=gid available? uid=$gid