- remove "nohup" from the suggested rc script.

- get ride of INSTALL-server and move database init to PLIST-server.
- bump PKGNAME.

ok mbalmer@
This commit is contained in:
aanriot 2006-10-09 11:55:18 +00:00
parent b93f8b8525
commit 1a5bf2fd3c
4 changed files with 10 additions and 65 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.88 2006/08/01 22:19:46 espie Exp $
# $OpenBSD: Makefile,v 1.89 2006/10/09 11:55:18 aanriot Exp $
COMMENT= "PostgreSQL RDBMS (client)"
COMMENT-server= "PostgreSQL RDBMS (server)"
@ -7,7 +7,7 @@ COMMENT-docs= "PostgreSQL RDBMS documentation"
VERSION= 8.1.4
DISTNAME= postgresql-${VERSION}
FULLPKGNAME= postgresql-client-${VERSION}
PKGNAME-server= postgresql-server-${VERSION}
PKGNAME-server= postgresql-server-${VERSION}p0
PKGNAME-docs= postgresql-docs-${VERSION}
CATEGORIES= databases

View File

@ -34,7 +34,7 @@ If you wish to start PostgreSQL automatically during system startup,
add the following lines to /etc/rc.local:
if [ -x !!PREFIX!!/bin/pg_ctl ]; then
su -l _postgresql -c "nohup !!PREFIX!!/bin/pg_ctl start \
su -l _postgresql -c "!!PREFIX!!/bin/pg_ctl start \
-D /var/postgresql/data -l /var/postgresql/logfile \
-o '-D /var/postgresql/data'"
echo -n ' postgresql'

View File

@ -1,60 +0,0 @@
#!/bin/sh
#
# $OpenBSD: INSTALL-server,v 1.2 2004/10/12 21:03:13 espie Exp $
#
# Pre/post-installation setup of postgresql
# use a sane path and install prefix
#
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
PGHOME=/var/postgresql
PG=_postgresql
do_initdb()
{
install -d -o $PG -g $PG -m 0755 $PGHOME
if [ ! -d $PGHOME/data ]; then
echo
echo "+---------------------"
echo "| Creating default database installation in:"
echo "|"
echo "| $PGHOME/data"
echo "+---------------------"
echo
install -d -o $PG -g $PG -m 0775 $PGHOME/data
su $PG -c "$PREFIX/bin/initdb -D $PGHOME/data"
echo
else
echo
echo "+---------------------"
echo "| Leaving existing database installation in:"
echo "|"
echo "| $PGHOME/data"
echo "|"
echo "| Note that any previous database files are UNLIKELY to"
echo "| be compatible with upgraded versions of $1"
echo "| package."
echo "|"
echo "| DO NOT just try to start the database unless you"
echo "| are absolutely sure that the existing files are"
echo "| compatible with this version of $1."
echo "|"
echo "| See the $1 documentation and/or"
echo "| $PREFIX/share/doc/postgresql/README.OpenBSD for"
echo "| more information."
echo "+---------------------"
echo
fi
}
# Verify/process the command
#
case $2 in
POST-INSTALL)
do_initdb $1
;;
esac
exit 0

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-server,v 1.9 2006/02/05 09:23:22 mbalmer Exp $
@comment $OpenBSD: PLIST-server,v 1.10 2006/10/09 11:55:18 aanriot Exp $
@conflict pgsql-*
@conflict pgsql-clients-*
@conflict postgresql-clients-*
@ -6,6 +6,7 @@
@conflict postgresql-*
@newgroup _postgresql:503
@newuser _postgresql:503:_postgresql:daemon:PostgreSQL Manager:/var/postgresql:/bin/sh
%%SHARED%%
bin/initdb
bin/ipcclean
bin/pg_controldata
@ -398,4 +399,8 @@ share/postgresql/pg_ident.conf.sample
share/postgresql/pg_service.conf.sample
share/postgresql/postgres.bki
share/postgresql/postgresql.conf.sample
%%SHARED%%
@mode 755
@owner _postgresql
@group _postgresql
@sample /var/postgresql/
@exec su _postgresql -c "%D/bin/initdb -D /var/postgresql/data"