NetBSD Problem Report #21133

Received: (qmail 5771 invoked by uid 605); 13 Apr 2003 18:32:37 -0000
Message-Id: <20030413183235.26139.qmail@ns01.minnesota.com>
Date: 13 Apr 2003 18:32:35 -0000
From: tom@minnesota.com
Sender: gnats-bugs-owner@netbsd.org
Reply-To: tom@minnesota.com
To: gnats-bugs@gnats.netbsd.org
Subject: pkg pgsql.sh rc.d script
X-Send-Pr-Version: 3.95

>Number:         21133
>Category:       pkg
>Synopsis:       not a good way of detecting already initdb
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 13 18:33:00 +0000 2003
>Closed-Date:    Sat Oct 11 07:05:41 +0000 2003
>Last-Modified:  Sat Oct 11 07:06:00 +0000 2003
>Originator:     Thomas T. Thai
>Release:        NetBSD 1.6R
>Organization:

--
Thomas T. Thai
Minnesota.com, Inc.
>Environment:
System: NetBSD ns01 1.6R NetBSD 1.6R (ns01-1.6) #1: Sat Apr 12 05:13:32 CDT 2003 tom@ns01:/var/build/alpha-obj/sys/arch/alpha/compile/ns01-1.6 alpha
Architecture: alpha
Machine: alpha
>Description:
pgsql_precmd()
{
        if [ ! -f ${pgsql_home}/data/base/1/PG_VERSION ]; then
                $rcd_dir/pgsql initdb
        fi
}

If you drop template1 and recreate it, you won't have .../base/1 directory. 
Just checking for ${pgsql_home}/data/base is enough.
>How-To-Repeat:
drop template1;
>Fix:
just detect the existence of ${pgsql_home}/data/base should be enough.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: grant 
State-Changed-When: Sat Oct 11 07:05:35 UTC 2003 
State-Changed-Why:  
thanks, I have fixed this now. 

From: grant beattie <grant@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/21133 CVS commit: pkgsrc/databases/postgresql-server/files
Date: Sat, 11 Oct 2003 07:05:19 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	grant
 Date:		Sat Oct 11 07:05:19 UTC 2003

 Modified Files:
 	pkgsrc/databases/postgresql-server/files: pgsql.sh

 Log Message:
 only test for existance of data directory, rather than the template
 databases to determine whether the dbdir has been initialised.

 fixes PR pkg/21133 from Thomas T. Thai.


 To generate a diff of this commit:
 cvs rdiff -r1.19 -r1.20 pkgsrc/databases/postgresql-server/files/pgsql.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:
 cvs src 20030412

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.