~ubuntu-branches/ubuntu/raring/postgresql-common/raring-proposed

« back to all changes in this revision

Viewing changes to debian/postgresql-common.postgresql.init

  • Committer: Package Import Robot
  • Author(s): Martin Pitt, Martin Pitt, Peter Eisentraut
  • Date: 2012-08-17 15:28:35 UTC
  • Revision ID: package-import@ubuntu.com-20120817152835-b86i933rohv1aq9r
Tags: 135
[ Martin Pitt ]
* pg_createcluster: For 9.2 and higher, use the new ssl_{cert,key}_file
  options instead of creating symlinks in the data directory.
  (Closes: #680162)
* pg_upgradecluster: Set above options to the old cluster's SSL cert/key
  symlink destinations, if they exist.
* debian/maintscripts-functions: Configure alternatives for manpages in
  -contrib. This will only take effect after (re)installing
  postgresql-contrib-9.2. (Closes: #680571)
* debian/postgresql-common.postgresql.init: Fix "status" output to be more
  useful and legible, and exit with code 3 if any cluster is down.
  (Closes: #656363)
* debian/postgresql-common.postgresql.init: Show a warning message if no
  clusters exist. (Closes: #677604)
* t/041_upgrade_custompaths.t: Run test with a cluster that is down, to
  verify that pg_upgradecluster works for non-running clusters, too.
* pg_upgradecluster: Move encoding detection after restarting the cluster
  with restricted connections, and drop the check that the cluster is
  running. With this, pg_upgradecluster also works for clusters which are
  not running. (Closes: #681344)

[ Peter Eisentraut ]
* pg_createcluster: For PostgreSQL >= 9.2, use initdb options to set the
  default authentication methods, instead of modifying the configuration
  file directly. (Closes: #685043)

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
case "$1" in
30
30
    start|stop|restart|reload)
 
31
        if [ -z "`pg_lsclusters -h`" ]; then
 
32
            log_warning_msg 'No PostgreSQL clusters exist; see "man pg_createcluster"'
 
33
            exit 0
 
34
        fi
31
35
        for v in $versions; do
32
36
            $1 $v
33
37
        done
34
38
        ;;
35
39
    status)
36
 
        set +e
37
 
        for v in $versions; do
38
 
            ($1 $v)
39
 
        done
40
 
        ;;
 
40
        LS=`pg_lsclusters -h`
 
41
        # no clusters -> unknown status
 
42
        [ -n "$LS" ] || exit 4
 
43
        echo "$LS" | awk 'BEGIN {rc=0} {if (match($4, "down")) rc=3; printf ("%s/%s (port %s): %s\n", $1, $2, $3, $4)}; END {exit rc}'
 
44
        ;;
41
45
    force-reload)
42
46
        for v in $versions; do
43
47
            reload $v