Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2002-02-18 05:48:45 +0000
committerBruce Momjian2002-02-18 05:48:45 +0000
commitfbcc0d69e81ce679a29182cbecc9ffa09b9cf239 (patch)
treed39df86f4b7e0eff722b1f403c6ebcec22ea5eee /src/bin/scripts/createuser
parentc9361a7a9c476b183e5a2b91fa2b085bf03773c4 (diff)
Fix param handling of create* admin scripts as described months ago.
Properly handles default values.
Diffstat (limited to 'src/bin/scripts/createuser')
-rw-r--r--src/bin/scripts/createuser7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/scripts/createuser b/src/bin/scripts/createuser
index fa20aa101cf..02e97c58c42 100644
--- a/src/bin/scripts/createuser
+++ b/src/bin/scripts/createuser
@@ -9,7 +9,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createuser,v 1.22 2001/09/30 22:17:51 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createuser,v 1.23 2002/02/18 05:48:44 momjian Exp $
#
# Note - this should NOT be setuid.
#
@@ -123,6 +123,11 @@ do
;;
*)
NewUser="$1"
+ if [ "$#" -ne 1 ]; then
+ echo "$CMDNAME: invalid option: $2" 1>&2
+ echo "Try '$CMDNAME --help' for more information." 1>&2
+ exit 1
+ fi
;;
esac
shift;