diff options
author | Marc G. Fournier | 1996-07-25 06:55:49 +0000 |
---|---|---|
committer | Marc G. Fournier | 1996-07-25 06:55:49 +0000 |
commit | ff50e5ab475f5ca5a86d6dd0f13bc088bed4fdc3 (patch) | |
tree | 40e148aee1a73fc3dd1188f01a395c9dc3774793 /src/bin/createuser | |
parent | 69ee15d66351bcbe0e4447b1804ed20d01a5f885 (diff) |
Switched from using monitor to using psql
Submitted by: Rick Weldon <rick@wisetech.com>
Diffstat (limited to 'src/bin/createuser')
-rw-r--r-- | src/bin/createuser/createuser.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/bin/createuser/createuser.sh b/src/bin/createuser/createuser.sh index 4178f945961..942fccfbc62 100644 --- a/src/bin/createuser/createuser.sh +++ b/src/bin/createuser/createuser.sh @@ -8,7 +8,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/createuser/Attic/createuser.sh,v 1.1.1.1 1996/07/09 06:22:12 scrappy Exp $ +# $Header: /cvsroot/pgsql/src/bin/createuser/Attic/createuser.sh,v 1.2 1996/07/25 06:55:30 scrappy Exp $ # # Note - this should NOT be setuid. # @@ -55,13 +55,13 @@ done AUTHOPT="-a $AUTHSYS" [ -z "$AUTHSYS" ] && AUTHOPT="" -MARGS="-TN $AUTHOPT -h $PGHOST -p $PGPORT" +PARGS="-T -q $AUTHOPT -H $PGHOST -p $PGPORT" # # generate the first part of the actual monitor command # -MONITOR="monitor $MARGS" +PSQL="psql $PARGS" # # see if user $USER is allowed to create new users @@ -70,7 +70,7 @@ MONITOR="monitor $MARGS" QUERY="select usesuper from pg_user where usename = '$USER'" #echo $QUERY -ADDUSER=`$MONITOR -TN -c "$QUERY" template1` +ADDUSER=`$PSQL -c "$QUERY" template1` if [ $? -ne 0 ] then @@ -100,7 +100,7 @@ fi QUERY="select usesysid from pg_user where usename = '$NEWUSER'" -RES=`$MONITOR -TN -c "$QUERY" template1` +RES=`$PSQL -c "$QUERY" template1` if [ $? -ne 0 ] then @@ -142,7 +142,7 @@ do exit 1 fi QUERY="select usename from pg_user where usesysid = '$SYSID'::int4" - RES=`$MONITOR -TN -c "$QUERY" template1` + RES=`$PSQL -c "$QUERY" template1` if [ $? -ne 0 ] then echo "$CMDNAME: database access failed." @@ -206,7 +206,7 @@ QUERY="insert into pg_user \ values \ ('$NEWUSER', $SYSID, '$CANCREATE', 't', '$CANADDUSER','t')" -RES=`$MONITOR -TN -c "$QUERY" template1` +RES=`$PSQL -c "$QUERY" template1` # # Wrap things up. If the user was created successfully, AND the user was |