Date: Sat, 30 Nov 2002 14:28:40 -0500 (EST) From: Michael Scheidell <scheidell@secnap.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/45877: postgres7 can't create initial database. Message-ID: <200211301928.gAUJSeDR010147@hackertrap.secnap.net>
next in thread | raw e-mail | index | archive | help
>Number: 45877 >Category: ports >Synopsis: postgres7 can't create initial database. >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Nov 30 11:30:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Michael Scheidell >Release: FreeBSD 4.7-STABLE i386 >Organization: SECNAP >Environment: System: FreeBSD hackertrap.secnap.net 4.7-STABLE FreeBSD 4.7-STABLE #6: Fri Nov 22 08:40:01 EST 2002 scheidell@hackertrap.secnap.net:/usr/obj/usr/src/sys/HACKERTRAP i386 >Description: postgres ver 7.2.3 postgres7 initdb program doesn't create directory. needs -p option. Example: su -l pgsql -c initdb The files belonging to this database system will be owned by user "pgsql". This user must also own the server process. creating directory /usr/local/pgsql/data... ok creating directory /usr/local/pgsql/data/base... ok creating directory /usr/local/pgsql/data/global... ok creating directory /usr/local/pgsql/data/pg_xlog... ok creating directory /usr/local/pgsql/data/pg_clog... ok creating template1 database in /usr/local/pgsql/data/base/1... Bad system call (core dumped) initdb failed. >How-To-Repeat: cd /usr/ports/postgres7 make install >Fix: Add in the -p option to mkdir. diff -bBru initdb.orig initdb --- initdb.orig Sat Nov 30 14:14:12 2002 +++ initdb Sat Nov 30 14:22:34 2002 @@ -461,7 +461,7 @@ $ECHO_N "creating template1 database in $PGDATA/base/1... "$ECHO_C rm -rf "$PGDATA"/base/1 || exit_nicely -mkdir "$PGDATA"/base/1 || exit_nicely +mkdir -p "$PGDATA"/base/1 || exit_nicely # Top level PG_VERSION is checked by bootstrapper, so make it first echo "$short_version" > "$PGDATA/PG_VERSION" || exit_nicely >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211301928.gAUJSeDR010147>