--- contrib/start-scripts/PostgreSQL.darwin	Wed Nov 12 04:28:45 2003
+++ ../../PostgreSQL.darwin	Tue May  3 12:49:42 2005
@@ -14,15 +14,15 @@
 #    /Library/StartupItems/PostgreSQL/PostgreSQL
 #    /Library/StartupItems/PostgreSQLStartupParameters.plist
 #
-# Next, add this line to the /etc/hostconfig file:
+# Next, add this line to the __PREFIX__/etc/rc.local file:
 #
-# POSTGRESQLSERVER=-YES-
+# POSTGRESQL7=-YES-
 #
 # The startup bundle will now be ready to go. To prevent this script from
 # starting PostgreSQL at system startup, simply change that line in
-# /etc/hostconfig back to:
+# __PREFIX__/etc/rc.local back to:
 #
-# POSTGRESQLSERVER=-NO-
+# POSTGRESQL7=-NO-
 #
 # For more information on Darwin/Mac OS X startup bundles, see this article:
 #
@@ -35,10 +35,10 @@
 ################################################################################
 
 # Installation prefix
-prefix=/usr/local/pgsql
+prefix=__PREFIX__
 
 # Data directory
-PGDATA="/usr/local/pgsql/data"
+PGDATA="${prefix}/var/db/pgsql/defaultdb"
 
 # Who to run pg_ctl as, should be "postgres".
 PGUSER=postgres
@@ -51,15 +51,16 @@
 ################################################################################
 
 # The path that is to be used for the script
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+PATH=${prefix}/sbin:${prefix}/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
 # What to use to start up the postmaster
 DAEMON="$prefix/bin/pg_ctl"
 
 . /etc/rc.common
+. ${prefix}/etc/rc.local
 
 StartService () {
-    if [ "${POSTGRESQLSERVER:=-NO-}" = "-YES-" ]; then
+    if [ "${POSTGRESQL7:=-NO-}" = "-YES-" ]; then
 	ConsoleMessage "Starting PostgreSQL database server"
 	sudo -u $PGUSER $DAEMON start -D "$PGDATA" -s -l $PGLOG
     fi
@@ -71,7 +72,7 @@
 }
 
 RestartService () {
-    if [ "${POSTGRESQLSERVER:=-NO-}" = "-YES-" ]; then
+    if [ "${POSTGRESQL7:=-NO-}" = "-YES-" ]; then
         ConsoleMessage "Restarting PostgreSQL database server"
 	sudo -u $PGUSER $DAEMON restart -D "$PGDATA" -s -m fast
     else
