diff options
| -rw-r--r-- | README | 2 | ||||
| -rw-r--r-- | legacy-sysv-script.in | 2 | ||||
| -rw-r--r-- | postgresql-ctl.in | 7 | ||||
| -rw-r--r-- | postgresql-setup.in | 2 | ||||
| -rw-r--r-- | postgresql.init.in | 4 |
5 files changed, 11 insertions, 6 deletions
@@ -3,7 +3,7 @@ postgresql-setup ---------------- BuildRequires: - - m4, docbook-utils, help2man + - m4, docbook-utils, help2man, elinks (pretty README.rpm-dist) Maintainer's BuildRequires - autoconf, automake, autoconf-archive diff --git a/legacy-sysv-script.in b/legacy-sysv-script.in index 6255373..5eaad51 100644 --- a/legacy-sysv-script.in +++ b/legacy-sysv-script.in @@ -1,6 +1,6 @@ #!/bin/sh # Legacy action script for "service postgresql --@__FILE__@" -cmd="@bindir@/postgresql-setup --@__FILE__@ @NAME_SERVICE@" +cmd="@bindir@/postgresql-setup --@__FILE__@ --unit @NAME_SERVICE@" echo "Hint: the preferred way to do this is now \"$cmd\"" >&2 $cmd diff --git a/postgresql-ctl.in b/postgresql-ctl.in index feef1d2..546ffba 100644 --- a/postgresql-ctl.in +++ b/postgresql-ctl.in @@ -17,4 +17,9 @@ @SCL_SOURCE@ -exec @bindir@/pg_ctl "$@" ${PGPORT+-o "-p $PGPORT"} +port=() +if test "$1" = "start" && test -n "$PGPORT"; then + port=(-o "-p $PGPORT") +fi + +exec @bindir@/pg_ctl "$@" "${port[@]}" diff --git a/postgresql-setup.in b/postgresql-setup.in index dcc2475..d4c73cf 100644 --- a/postgresql-setup.in +++ b/postgresql-setup.in @@ -408,7 +408,7 @@ handle_pgconf() test -r "$conffile" || { error "config file $conffile is not readable or does not exist" - return 1 + die "Old cluster in '$data' does not seem to be initialized" } local sp='[[:space:]]' diff --git a/postgresql.init.in b/postgresql.init.in index aadd3dd..dc4c9a7 100644 --- a/postgresql.init.in +++ b/postgresql.init.in @@ -187,14 +187,14 @@ __single_comand() initdb() { __single_comand $"Initializing database" \ - @NAME_BINARYBASE@-setup --initdb "$NAME" "$@" + @bindir@/@NAME_BINARYBASE@-setup --initdb "$NAME" "$@" } upgrade() { __single_comand $"Upgrading database" \ - @NAME_BINARYBASE@-setup --upgrade "$NAME" "$@" + @bindir@/@NAME_BINARYBASE@-setup --upgrade "$NAME" "$@" } |
