Skip to content

Commit 30826ce

Browse files
committed
Enable initdb to create several levels of directories for PGDATA, if
`mkdir -p' works.
1 parent 1e2eb21 commit 30826ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/initdb/initdb.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#
2424
# Copyright (c) 1994, Regents of the University of California
2525
#
26-
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.103 2000/09/01 13:15:27 petere Exp $
26+
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.104 2000/09/29 13:38:02 petere Exp $
2727
#
2828
#-------------------------------------------------------------------------
2929

@@ -385,7 +385,7 @@ then
385385
else
386386
if [ ! -d "$PGDATA" ]; then
387387
echo "Creating directory $PGDATA"
388-
mkdir "$PGDATA" || exit_nicely
388+
mkdir -p "$PGDATA" >/dev/null 2>&1 || mkdir "$PGDATA" || exit_nicely
389389
made_new_pgdata=yes
390390
else
391391
echo "Fixing permissions on existing directory $PGDATA"

0 commit comments

Comments
 (0)