diff options
| author | Bryan Henderson | 1996-11-14 10:25:54 +0000 |
|---|---|---|
| committer | Bryan Henderson | 1996-11-14 10:25:54 +0000 |
| commit | f64b8403871fbb8a5cd475f58dd432a53549a60d (patch) | |
| tree | 038ebc1218e286105fdba624a7a53cd7d26518a2 /src/bin/destroyuser | |
| parent | 7ac541daf1b0bba6274f280eedba01166f97cbe8 (diff) | |
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/destroyuser')
| -rw-r--r-- | src/bin/destroyuser/Makefile | 6 | ||||
| -rw-r--r-- | src/bin/destroyuser/destroyuser.sh | 36 |
2 files changed, 21 insertions, 21 deletions
diff --git a/src/bin/destroyuser/Makefile b/src/bin/destroyuser/Makefile index 5db5796c758..d8903717936 100644 --- a/src/bin/destroyuser/Makefile +++ b/src/bin/destroyuser/Makefile @@ -7,7 +7,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/destroyuser/Attic/Makefile,v 1.2 1996/11/11 13:40:04 bryanh Exp $ +# $Header: /cvsroot/pgsql/src/bin/destroyuser/Attic/Makefile,v 1.3 1996/11/14 10:25:16 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: destroyuser -destroyuser: +destroyuser: destroyuser.sh sed $(SEDSCRIPT) <destroyuser.sh >destroyuser install: destroyuser diff --git a/src/bin/destroyuser/destroyuser.sh b/src/bin/destroyuser/destroyuser.sh index 8f6afc1ee73..41d9509c1f9 100644 --- a/src/bin/destroyuser/destroyuser.sh +++ b/src/bin/destroyuser/destroyuser.sh @@ -8,25 +8,12 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/destroyuser/Attic/destroyuser.sh,v 1.4 1996/09/21 06:24:31 scrappy Exp $ +# $Header: /cvsroot/pgsql/src/bin/destroyuser/Attic/destroyuser.sh,v 1.5 1996/11/14 10:25:19 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 -p $PGPORT -h $PGHOST" +PARGS="-tq $AUTHOPT $PGHOSTOPT $PGPORTOPT # # generate the first part of the actual monitor command |
