Wed Feb 6 22:33:44 2019 UTC ()
As suggested by joerg@, "cd /" works even when initdb hasn't happened yet.
Ride previous PKGREVISION bump.


(schmonz)
diff -r1.2 -r1.3 pkgsrc/databases/postgresql10-server/files/pgsql.sh
diff -r1.2 -r1.3 pkgsrc/databases/postgresql11-server/files/pgsql.sh
diff -r1.2 -r1.3 pkgsrc/databases/postgresql93-server/files/pgsql.sh
diff -r1.2 -r1.3 pkgsrc/databases/postgresql94-server/files/pgsql.sh
diff -r1.2 -r1.3 pkgsrc/databases/postgresql95-server/files/pgsql.sh
diff -r1.2 -r1.3 pkgsrc/databases/postgresql96-server/files/pgsql.sh

cvs diff -r1.2 -r1.3 pkgsrc/databases/postgresql10-server/files/Attic/pgsql.sh (expand / switch to unified diff)

--- pkgsrc/databases/postgresql10-server/files/Attic/pgsql.sh 2019/02/06 18:45:55 1.2
+++ pkgsrc/databases/postgresql10-server/files/Attic/pgsql.sh 2019/02/06 22:33:43 1.3
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: pgsql.sh,v 1.2 2019/02/06 18:45:55 schmonz Exp $ 3# $NetBSD: pgsql.sh,v 1.3 2019/02/06 22:33:43 schmonz Exp $
4# 4#
5# PostgreSQL database rc.d control script 5# PostgreSQL database rc.d control script
6# 6#
7# PROVIDE: pgsql 7# PROVIDE: pgsql
8# REQUIRE: DAEMON 8# REQUIRE: DAEMON
9# KEYWORD: shutdown 9# KEYWORD: shutdown
10# 10#
11# You will need to set some variables in /etc/rc.conf to start PostgreSQL: 11# You will need to set some variables in /etc/rc.conf to start PostgreSQL:
12# 12#
13# pgsql=YES 13# pgsql=YES
14# 14#
15# Optionally, "pgsql_flags" contains options for the PostgreSQL postmaster, e.g. 15# Optionally, "pgsql_flags" contains options for the PostgreSQL postmaster, e.g.
16# pgsql_flags="-i" # allows TCP/IP connections 16# pgsql_flags="-i" # allows TCP/IP connections
@@ -35,27 +35,27 @@ initdb_cmd="pgsql_initdb" @@ -35,27 +35,27 @@ initdb_cmd="pgsql_initdb"
35start_precmd="pgsql_precmd" 35start_precmd="pgsql_precmd"
36start_cmd="pgsql_start" 36start_cmd="pgsql_start"
37restart_precmd="pgsql_precmd" 37restart_precmd="pgsql_precmd"
38restart_cmd="pgsql_restart" 38restart_cmd="pgsql_restart"
39stop_cmd="pgsql_stop" 39stop_cmd="pgsql_stop"
40reload_cmd="pgsql_reload" 40reload_cmd="pgsql_reload"
41 41
42if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then 42if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
43 load_rc_config $name 43 load_rc_config $name
44elif [ -f /etc/rc.conf ]; then 44elif [ -f /etc/rc.conf ]; then
45 . /etc/rc.conf 45 . /etc/rc.conf
46fi 46fi
47 47
48cd "${pgsql_home}" 48cd /
49 49
50command_args="-w -s -D ${pgsql_home}/data -m fast -l ${pgsql_home}/errlog" 50command_args="-w -s -D ${pgsql_home}/data -m fast -l ${pgsql_home}/errlog"
51if [ -n "${pgsql_flags}" ]; then 51if [ -n "${pgsql_flags}" ]; then
52 command_args="${command_args} -o \\\"${pgsql_flags}\\\"" 52 command_args="${command_args} -o \\\"${pgsql_flags}\\\""
53fi 53fi
54 54
55pgsql_precmd() 55pgsql_precmd()
56{ 56{
57 ulimit -n 4096 57 ulimit -n 4096
58 if [ ! -d ${pgsql_home}/data/base ]; then 58 if [ ! -d ${pgsql_home}/data/base ]; then
59 pgsql_initdb 59 pgsql_initdb
60 fi 60 fi
61} 61}

cvs diff -r1.2 -r1.3 pkgsrc/databases/postgresql11-server/files/pgsql.sh (expand / switch to unified diff)

--- pkgsrc/databases/postgresql11-server/files/pgsql.sh 2019/02/06 18:45:55 1.2
+++ pkgsrc/databases/postgresql11-server/files/pgsql.sh 2019/02/06 22:33:43 1.3
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: pgsql.sh,v 1.2 2019/02/06 18:45:55 schmonz Exp $ 3# $NetBSD: pgsql.sh,v 1.3 2019/02/06 22:33:43 schmonz Exp $
4# 4#
5# PostgreSQL database rc.d control script 5# PostgreSQL database rc.d control script
6# 6#
7# PROVIDE: pgsql 7# PROVIDE: pgsql
8# REQUIRE: DAEMON 8# REQUIRE: DAEMON
9# KEYWORD: shutdown 9# KEYWORD: shutdown
10# 10#
11# You will need to set some variables in /etc/rc.conf to start PostgreSQL: 11# You will need to set some variables in /etc/rc.conf to start PostgreSQL:
12# 12#
13# pgsql=YES 13# pgsql=YES
14# 14#
15# Optionally, "pgsql_flags" contains options for the PostgreSQL postmaster, e.g. 15# Optionally, "pgsql_flags" contains options for the PostgreSQL postmaster, e.g.
16# pgsql_flags="-i" # allows TCP/IP connections 16# pgsql_flags="-i" # allows TCP/IP connections
@@ -35,27 +35,27 @@ initdb_cmd="pgsql_initdb" @@ -35,27 +35,27 @@ initdb_cmd="pgsql_initdb"
35start_precmd="pgsql_precmd" 35start_precmd="pgsql_precmd"
36start_cmd="pgsql_start" 36start_cmd="pgsql_start"
37restart_precmd="pgsql_precmd" 37restart_precmd="pgsql_precmd"
38restart_cmd="pgsql_restart" 38restart_cmd="pgsql_restart"
39stop_cmd="pgsql_stop" 39stop_cmd="pgsql_stop"
40reload_cmd="pgsql_reload" 40reload_cmd="pgsql_reload"
41 41
42if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then 42if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
43 load_rc_config $name 43 load_rc_config $name
44elif [ -f /etc/rc.conf ]; then 44elif [ -f /etc/rc.conf ]; then
45 . /etc/rc.conf 45 . /etc/rc.conf
46fi 46fi
47 47
48cd "${pgsql_home}" 48cd /
49 49
50command_args="-w -s -D ${pgsql_home}/data -m fast -l ${pgsql_home}/errlog" 50command_args="-w -s -D ${pgsql_home}/data -m fast -l ${pgsql_home}/errlog"
51if [ -n "${pgsql_flags}" ]; then 51if [ -n "${pgsql_flags}" ]; then
52 command_args="${command_args} -o \\\"${pgsql_flags}\\\"" 52 command_args="${command_args} -o \\\"${pgsql_flags}\\\""
53fi 53fi
54 54
55pgsql_precmd() 55pgsql_precmd()
56{ 56{
57 ulimit -n 4096 57 ulimit -n 4096
58 if [ ! -d ${pgsql_home}/data/base ]; then 58 if [ ! -d ${pgsql_home}/data/base ]; then
59 pgsql_initdb 59 pgsql_initdb
60 fi 60 fi
61} 61}

cvs diff -r1.2 -r1.3 pkgsrc/databases/postgresql93-server/files/Attic/pgsql.sh (expand / switch to unified diff)

--- pkgsrc/databases/postgresql93-server/files/Attic/pgsql.sh 2019/02/06 18:45:55 1.2
+++ pkgsrc/databases/postgresql93-server/files/Attic/pgsql.sh 2019/02/06 22:33:44 1.3
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: pgsql.sh,v 1.2 2019/02/06 18:45:55 schmonz Exp $ 3# $NetBSD: pgsql.sh,v 1.3 2019/02/06 22:33:44 schmonz Exp $
4# 4#
5# PostgreSQL database rc.d control script 5# PostgreSQL database rc.d control script
6# 6#
7# PROVIDE: pgsql 7# PROVIDE: pgsql
8# REQUIRE: DAEMON 8# REQUIRE: DAEMON
9# KEYWORD: shutdown 9# KEYWORD: shutdown
10# 10#
11# You will need to set some variables in /etc/rc.conf to start PostgreSQL: 11# You will need to set some variables in /etc/rc.conf to start PostgreSQL:
12# 12#
13# pgsql=YES 13# pgsql=YES
14# 14#
15# Optionally, "pgsql_flags" contains options for the PostgreSQL postmaster, e.g. 15# Optionally, "pgsql_flags" contains options for the PostgreSQL postmaster, e.g.
16# pgsql_flags="-i" # allows TCP/IP connections 16# pgsql_flags="-i" # allows TCP/IP connections
@@ -35,27 +35,27 @@ initdb_cmd="pgsql_initdb" @@ -35,27 +35,27 @@ initdb_cmd="pgsql_initdb"
35start_precmd="pgsql_precmd" 35start_precmd="pgsql_precmd"
36start_cmd="pgsql_start" 36start_cmd="pgsql_start"
37restart_precmd="pgsql_precmd" 37restart_precmd="pgsql_precmd"
38restart_cmd="pgsql_restart" 38restart_cmd="pgsql_restart"
39stop_cmd="pgsql_stop" 39stop_cmd="pgsql_stop"
40reload_cmd="pgsql_reload" 40reload_cmd="pgsql_reload"
41 41
42if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then 42if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
43 load_rc_config $name 43 load_rc_config $name
44elif [ -f /etc/rc.conf ]; then 44elif [ -f /etc/rc.conf ]; then
45 . /etc/rc.conf 45 . /etc/rc.conf
46fi 46fi
47 47
48cd "${pgsql_home}" 48cd /
49 49
50command_args="-w -s -D ${pgsql_home}/data -m fast -l ${pgsql_home}/errlog" 50command_args="-w -s -D ${pgsql_home}/data -m fast -l ${pgsql_home}/errlog"
51if [ -n "${pgsql_flags}" ]; then 51if [ -n "${pgsql_flags}" ]; then
52 command_args="${command_args} -o \\\"${pgsql_flags}\\\"" 52 command_args="${command_args} -o \\\"${pgsql_flags}\\\""
53fi 53fi
54 54
55pgsql_precmd() 55pgsql_precmd()
56{ 56{
57 ulimit -n 4096 57 ulimit -n 4096
58 if [ ! -d ${pgsql_home}/data/base ]; then 58 if [ ! -d ${pgsql_home}/data/base ]; then
59 pgsql_initdb 59 pgsql_initdb
60 fi 60 fi
61} 61}

cvs diff -r1.2 -r1.3 pkgsrc/databases/postgresql94-server/files/Attic/pgsql.sh (expand / switch to unified diff)

--- pkgsrc/databases/postgresql94-server/files/Attic/pgsql.sh 2019/02/06 18:45:55 1.2
+++ pkgsrc/databases/postgresql94-server/files/Attic/pgsql.sh 2019/02/06 22:33:44 1.3
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: pgsql.sh,v 1.2 2019/02/06 18:45:55 schmonz Exp $ 3# $NetBSD: pgsql.sh,v 1.3 2019/02/06 22:33:44 schmonz Exp $
4# 4#
5# PostgreSQL database rc.d control script 5# PostgreSQL database rc.d control script
6# 6#
7# PROVIDE: pgsql 7# PROVIDE: pgsql
8# REQUIRE: DAEMON 8# REQUIRE: DAEMON
9# KEYWORD: shutdown 9# KEYWORD: shutdown
10# 10#
11# You will need to set some variables in /etc/rc.conf to start PostgreSQL: 11# You will need to set some variables in /etc/rc.conf to start PostgreSQL:
12# 12#
13# pgsql=YES 13# pgsql=YES
14# 14#
15# Optionally, "pgsql_flags" contains options for the PostgreSQL postmaster, e.g. 15# Optionally, "pgsql_flags" contains options for the PostgreSQL postmaster, e.g.
16# pgsql_flags="-i" # allows TCP/IP connections 16# pgsql_flags="-i" # allows TCP/IP connections
@@ -35,27 +35,27 @@ initdb_cmd="pgsql_initdb" @@ -35,27 +35,27 @@ initdb_cmd="pgsql_initdb"
35start_precmd="pgsql_precmd" 35start_precmd="pgsql_precmd"
36start_cmd="pgsql_start" 36start_cmd="pgsql_start"
37restart_precmd="pgsql_precmd" 37restart_precmd="pgsql_precmd"
38restart_cmd="pgsql_restart" 38restart_cmd="pgsql_restart"
39stop_cmd="pgsql_stop" 39stop_cmd="pgsql_stop"
40reload_cmd="pgsql_reload" 40reload_cmd="pgsql_reload"
41 41
42if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then 42if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
43 load_rc_config $name 43 load_rc_config $name
44elif [ -f /etc/rc.conf ]; then 44elif [ -f /etc/rc.conf ]; then
45 . /etc/rc.conf 45 . /etc/rc.conf
46fi 46fi
47 47
48cd "${pgsql_home}" 48cd /
49 49
50command_args="-w -s -D ${pgsql_home}/data -m fast -l ${pgsql_home}/errlog" 50command_args="-w -s -D ${pgsql_home}/data -m fast -l ${pgsql_home}/errlog"
51if [ -n "${pgsql_flags}" ]; then 51if [ -n "${pgsql_flags}" ]; then
52 command_args="${command_args} -o \\\"${pgsql_flags}\\\"" 52 command_args="${command_args} -o \\\"${pgsql_flags}\\\""
53fi 53fi
54 54
55pgsql_precmd() 55pgsql_precmd()
56{ 56{
57 ulimit -n 4096 57 ulimit -n 4096
58 if [ ! -d ${pgsql_home}/data/base ]; then 58 if [ ! -d ${pgsql_home}/data/base ]; then
59 pgsql_initdb 59 pgsql_initdb
60 fi 60 fi
61} 61}

cvs diff -r1.2 -r1.3 pkgsrc/databases/postgresql95-server/files/Attic/pgsql.sh (expand / switch to unified diff)

--- pkgsrc/databases/postgresql95-server/files/Attic/pgsql.sh 2019/02/06 18:45:55 1.2
+++ pkgsrc/databases/postgresql95-server/files/Attic/pgsql.sh 2019/02/06 22:33:44 1.3
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: pgsql.sh,v 1.2 2019/02/06 18:45:55 schmonz Exp $ 3# $NetBSD: pgsql.sh,v 1.3 2019/02/06 22:33:44 schmonz Exp $
4# 4#
5# PostgreSQL database rc.d control script 5# PostgreSQL database rc.d control script
6# 6#
7# PROVIDE: pgsql 7# PROVIDE: pgsql
8# REQUIRE: DAEMON 8# REQUIRE: DAEMON
9# KEYWORD: shutdown 9# KEYWORD: shutdown
10# 10#
11# You will need to set some variables in /etc/rc.conf to start PostgreSQL: 11# You will need to set some variables in /etc/rc.conf to start PostgreSQL:
12# 12#
13# pgsql=YES 13# pgsql=YES
14# 14#
15# Optionally, "pgsql_flags" contains options for the PostgreSQL postmaster, e.g. 15# Optionally, "pgsql_flags" contains options for the PostgreSQL postmaster, e.g.
16# pgsql_flags="-i" # allows TCP/IP connections 16# pgsql_flags="-i" # allows TCP/IP connections
@@ -35,27 +35,27 @@ initdb_cmd="pgsql_initdb" @@ -35,27 +35,27 @@ initdb_cmd="pgsql_initdb"
35start_precmd="pgsql_precmd" 35start_precmd="pgsql_precmd"
36start_cmd="pgsql_start" 36start_cmd="pgsql_start"
37restart_precmd="pgsql_precmd" 37restart_precmd="pgsql_precmd"
38restart_cmd="pgsql_restart" 38restart_cmd="pgsql_restart"
39stop_cmd="pgsql_stop" 39stop_cmd="pgsql_stop"
40reload_cmd="pgsql_reload" 40reload_cmd="pgsql_reload"
41 41
42if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then 42if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
43 load_rc_config $name 43 load_rc_config $name
44elif [ -f /etc/rc.conf ]; then 44elif [ -f /etc/rc.conf ]; then
45 . /etc/rc.conf 45 . /etc/rc.conf
46fi 46fi
47 47
48cd "${pgsql_home}" 48cd /
49 49
50command_args="-w -s -D ${pgsql_home}/data -m fast -l ${pgsql_home}/errlog" 50command_args="-w -s -D ${pgsql_home}/data -m fast -l ${pgsql_home}/errlog"
51if [ -n "${pgsql_flags}" ]; then 51if [ -n "${pgsql_flags}" ]; then
52 command_args="${command_args} -o \\\"${pgsql_flags}\\\"" 52 command_args="${command_args} -o \\\"${pgsql_flags}\\\""
53fi 53fi
54 54
55pgsql_precmd() 55pgsql_precmd()
56{ 56{
57 ulimit -n 4096 57 ulimit -n 4096
58 if [ ! -d ${pgsql_home}/data/base ]; then 58 if [ ! -d ${pgsql_home}/data/base ]; then
59 pgsql_initdb 59 pgsql_initdb
60 fi 60 fi
61} 61}

cvs diff -r1.2 -r1.3 pkgsrc/databases/postgresql96-server/files/Attic/pgsql.sh (expand / switch to unified diff)

--- pkgsrc/databases/postgresql96-server/files/Attic/pgsql.sh 2019/02/06 18:45:56 1.2
+++ pkgsrc/databases/postgresql96-server/files/Attic/pgsql.sh 2019/02/06 22:33:44 1.3
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: pgsql.sh,v 1.2 2019/02/06 18:45:56 schmonz Exp $ 3# $NetBSD: pgsql.sh,v 1.3 2019/02/06 22:33:44 schmonz Exp $
4# 4#
5# PostgreSQL database rc.d control script 5# PostgreSQL database rc.d control script
6# 6#
7# PROVIDE: pgsql 7# PROVIDE: pgsql
8# REQUIRE: DAEMON 8# REQUIRE: DAEMON
9# KEYWORD: shutdown 9# KEYWORD: shutdown
10# 10#
11# You will need to set some variables in /etc/rc.conf to start PostgreSQL: 11# You will need to set some variables in /etc/rc.conf to start PostgreSQL:
12# 12#
13# pgsql=YES 13# pgsql=YES
14# 14#
15# Optionally, "pgsql_flags" contains options for the PostgreSQL postmaster, e.g. 15# Optionally, "pgsql_flags" contains options for the PostgreSQL postmaster, e.g.
16# pgsql_flags="-i" # allows TCP/IP connections 16# pgsql_flags="-i" # allows TCP/IP connections
@@ -35,27 +35,27 @@ initdb_cmd="pgsql_initdb" @@ -35,27 +35,27 @@ initdb_cmd="pgsql_initdb"
35start_precmd="pgsql_precmd" 35start_precmd="pgsql_precmd"
36start_cmd="pgsql_start" 36start_cmd="pgsql_start"
37restart_precmd="pgsql_precmd" 37restart_precmd="pgsql_precmd"
38restart_cmd="pgsql_restart" 38restart_cmd="pgsql_restart"
39stop_cmd="pgsql_stop" 39stop_cmd="pgsql_stop"
40reload_cmd="pgsql_reload" 40reload_cmd="pgsql_reload"
41 41
42if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then 42if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
43 load_rc_config $name 43 load_rc_config $name
44elif [ -f /etc/rc.conf ]; then 44elif [ -f /etc/rc.conf ]; then
45 . /etc/rc.conf 45 . /etc/rc.conf
46fi 46fi
47 47
48cd "${pgsql_home}" 48cd /
49 49
50command_args="-w -s -D ${pgsql_home}/data -m fast -l ${pgsql_home}/errlog" 50command_args="-w -s -D ${pgsql_home}/data -m fast -l ${pgsql_home}/errlog"
51if [ -n "${pgsql_flags}" ]; then 51if [ -n "${pgsql_flags}" ]; then
52 command_args="${command_args} -o \\\"${pgsql_flags}\\\"" 52 command_args="${command_args} -o \\\"${pgsql_flags}\\\""
53fi 53fi
54 54
55pgsql_precmd() 55pgsql_precmd()
56{ 56{
57 ulimit -n 4096 57 ulimit -n 4096
58 if [ ! -d ${pgsql_home}/data/base ]; then 58 if [ ! -d ${pgsql_home}/data/base ]; then
59 pgsql_initdb 59 pgsql_initdb
60 fi 60 fi
61} 61}