Subject: Re: CVS commit: pkgsrc/databases/postgresql-server/files
To: Takahiro Kambe <taca@sky.yamashina.kyoto.jp>
From: Curt Sampson <cjs@cynic.net>
List: pkgsrc-changes
Date: 07/22/2002 14:01:14
On Sat, 20 Jul 2002, Takahiro Kambe wrote:

> In message <20020718014008.350FEB004@cvs.netbsd.org>
> 	on Thu, 18 Jul 2002 04:40:08 +0300 (EEST),
> 	Curt Sampson <cjs@netbsd.org> wrote:
> > Module Name:	pkgsrc
> > Committed By:	cjs
> > Date:		Thu Jul 18 01:40:07 UTC 2002
> >
> > Modified Files:
> > 	pkgsrc/databases/postgresql-server/files: pgsql.sh
> >
> > Log Message:
> > Don't hard-code PGHOME; get it from the passwd file.
> This change seems to depend on sh(1) can handle tilde expamsion.
> Is it safe for non-NetBSD system?

It's not safe on /bin/sh on Solaris, from the looks of it. (I
checked the manual page, as I don't have a solaris system handy.)
So we can revert this, switch the script to ksh, or find a more
portable way of figuring out a user's home directory.

Does pkgsrc port to machines without ksh? The ones I know of where ksh
is unlikely to be available (on standard installs) are FreeBSD and
Linux.

Anybody know of a better way to deal with this? Maybe "su -l pgsql
-c 'echo $HOME'"? Or are there problems with the -l option there?
I guess I could always just awk it out of /etc/passwd....

cjs
-- 
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.netbsd.org
    Don't you know, in this new Dark Age, we're all light.  --XTC