diff options
| author | Bryan Henderson <bryanh@giraffe.netgate.net> | 1996-11-14 10:25:54 +0000 |
|---|---|---|
| committer | Bryan Henderson <bryanh@giraffe.netgate.net> | 1996-11-14 10:25:54 +0000 |
| commit | f64b8403871fbb8a5cd475f58dd432a53549a60d (patch) | |
| tree | 038ebc1218e286105fdba624a7a53cd7d26518a2 /src/bin/createuser | |
| parent | 7ac541daf1b0bba6274f280eedba01166f97cbe8 (diff) | |
| download | postgresql-f64b8403871fbb8a5cd475f58dd432a53549a60d.tar.gz | |
Remove most compile-time options, add a few runtime options to make up for it.
In particular, no more compiled-in default for PGDATA or LIBDIR. Commands
that need them need either invocation options or environment variables.
PGPORT default is hardcoded as 5432, but overrideable with options or
environment variables.
Diffstat (limited to 'src/bin/createuser')
| -rw-r--r-- | src/bin/createuser/Makefile | 6 | ||||
| -rw-r--r-- | src/bin/createuser/createuser.sh | 36 |
2 files changed, 21 insertions, 21 deletions
diff --git a/src/bin/createuser/Makefile b/src/bin/createuser/Makefile index 7828758b59..45b8db3da2 100644 --- a/src/bin/createuser/Makefile +++ b/src/bin/createuser/Makefile @@ -7,7 +7,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/createuser/Attic/Makefile,v 1.2 1996/11/11 13:39:40 bryanh Exp $ +# $Header: /cvsroot/pgsql/src/bin/createuser/Attic/Makefile,v 1.3 1996/11/14 10:24:48 bryanh Exp $ # #------------------------------------------------------------------------- @@ -15,14 +15,12 @@ SRCDIR= ../.. include ../../Makefile.global SEDSCRIPT= \ - -e "s^_fUnKy_BINDIR_sTuFf_^$(BINDIR)^g" \ - -e "s^_fUnKy_POSTPORT_sTuFf_^$(POSTPORT)^g" \ -e "s^_fUnKy_DASH_N_sTuFf_^$(DASH_N)^g" \ -e "s^_fUnKy_BACKSLASH_C_sTuFf_^$(BACKSLASH_C)^g" all: createuser -createuser: +createuser: createuser.sh sed $(SEDSCRIPT) <createuser.sh >createuser install: createuser diff --git a/src/bin/createuser/createuser.sh b/src/bin/createuser/createuser.sh index 3081baa5d3..5789b72b60 100644 --- a/src/bin/createuser/createuser.sh +++ b/src/bin/createuser/createuser.sh @@ -8,25 +8,12 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/createuser/Attic/createuser.sh,v 1.5 1996/10/04 20:29:35 scrappy Exp $ +# $Header: /cvsroot/pgsql/src/bin/createuser/Attic/createuser.sh,v 1.6 1996/11/14 10:24:54 bryanh Exp $ # # Note - this should NOT be setuid. # #------------------------------------------------------------------------- -# ---------------- -# Set paths from environment or default values. -# The _fUnKy_..._sTuFf_ gets set when the script is installed -# from the default value for this build. -# Currently the only thing we look for from the environment is -# PGDATA, PGHOST, and PGPORT -# -# ---------------- -[ -z "$PGPORT" ] && PGPORT=_fUnKy_POSTPORT_sTuFf_ -[ -z "$PGHOST" ] && PGHOST=localhost -BINDIR=_fUnKy_BINDIR_sTuFf_ -PATH=$BINDIR:$PATH - CMDNAME=`basename $0` if [ -z "$USER" ]; then @@ -52,10 +39,25 @@ do shift; done -AUTHOPT="-a $AUTHSYS" -[ -z "$AUTHSYS" ] && AUTHOPT="" +if [-z "$AUTHSYS" ]; then + AUTHOPT = "" +else + AUTHOPT = "-a $AUTHSYS" +fi + +if [-z "$PGHOST" ]; then + PGHOSTOPT = "" +else + PGHOSTOPT = "-h $PGHOST" +fi + +if [-z "$PGPORT" ]; then + PGPORTOPT = "" +else + PGPORTOPT = "-p $PGPORT" +fi -PARGS="-tq $AUTHOPT -h $PGHOST -p $PGPORT" +PARGS="-tq $AUTHOPT $PGHOSTOPT $PGPORTOPT # # generate the first part of the actual monitor command |
