Skip to content

Commit b1c7cba

Browse files
committed
There are a number of tests "[" that fail if the variable is not enclosed in
quotes (") and the sed scripts need to be in single quotes Submitted by: Keith Parks <emkxp01@mtcc.demon.co.uk>
1 parent 7441e1f commit b1c7cba

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/bin/initdb/initdb.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#
2727
#
2828
# IDENTIFICATION
29-
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.19 1996/11/29 06:24:14 bryanh Exp $
29+
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.19.2.1 1996/12/22 03:20:00 scrappy Exp $
3030
#
3131
#-------------------------------------------------------------------------
3232

@@ -83,34 +83,34 @@ do
8383
echo "updating template1 database only."
8484
;;
8585
--username=*)
86-
POSTGRES_SUPERUSERNAME="`echo $1 | sed s/^--username=//`"
86+
POSTGRES_SUPERUSERNAME="`echo $1 | sed 's/^--username=//'`"
8787
;;
8888
-u)
8989
shift
9090
POSTGRES_SUPERUSERNAME="$1"
9191
;;
9292
-u*)
93-
POSTGRES_SUPERUSERNAME="`echo $1 | sed s/^-u//`"
93+
POSTGRES_SUPERUSERNAME="`echo $1 | sed 's/^-u//'`"
9494
;;
9595
--pgdata=*)
96-
PGDATA="`echo $1 | sed s/^--pgdata=//`"
96+
PGDATA="`echo $1 | sed 's/^--pgdata=//'`"
9797
;;
9898
-r)
9999
shift
100100
PGDATA="$1"
101101
;;
102102
-r*)
103-
PGDATA="`echo $1 | sed s/^-r//`"
103+
PGDATA="`echo $1 | sed 's/^-r//'`"
104104
;;
105105
--pglib=*)
106-
PGLIB="`echo $1 | sed s/^--pglib=//`"
106+
PGLIB="`echo $1 | sed 's/^--pglib=//'`"
107107
;;
108108
-l)
109109
shift
110110
PGLIB="$1"
111111
;;
112112
-l*)
113-
PGLIB="`echo $1 | sed s/^-l//`"
113+
PGLIB="`echo $1 | sed 's/^-l//'`"
114114
;;
115115

116116
*)
@@ -128,7 +128,7 @@ done
128128
#-------------------------------------------------------------------------
129129
# Make sure he told us where to find the Postgres files.
130130
#-------------------------------------------------------------------------
131-
if [ -z $PGLIB ]; then
131+
if [ -z "$PGLIB" ]; then
132132
echo "$CMDNAME does not know where to find the files that make up "
133133
echo "Postgres (the PGLIB directory). You must identify the PGLIB "
134134
echo "directory either with a --pglib invocation option, or by "
@@ -142,7 +142,7 @@ fi
142142
# Make sure he told us where to build the database system
143143
#-------------------------------------------------------------------------
144144

145-
if [ -z $PGDATA ]; then
145+
if [ -z "$PGDATA" ]; then
146146
echo "$CMDNAME: You must identify the PGDATA directory, where the data"
147147
echo "for this database system will reside. Do this with either a"
148148
echo "--pgdata invocation option or a PGDATA environment variable."
@@ -181,7 +181,7 @@ fi
181181
# Figure out who the Postgres superuser for the new database system will be.
182182
#---------------------------------------------------------------------------
183183

184-
if [ -z $POSTGRES_SUPERUSERNAME ]; then
184+
if [ -z "$POSTGRES_SUPERUSERNAME" ]; then
185185
echo "Can't tell what username to use. You don't have the USER"
186186
echo "environment variable set to your username and didn't specify the "
187187
echo "--username option"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy