Public bug reported:

Because "set +e" is set in the "status" case of the postgresql init
script, running "service postgresql status" or "/etc/init.d/postgresql
status" always returns with exit code 0. Even when no clusters are
running the exit code is 0, when it should really be 3, indicating that
the service is not running (as per LSB specs). This has negative
implications for Pacemaker, Puppet and other applications that expect
init scripts to conform to LSB specifications.

Attached is a simple patch that removes "set +e" and makes the init
script behave properly.

** Affects: postgresql-9.1 (Ubuntu)
     Importance: Undecided
         Status: New

** Patch added: "Remove "set +e" from init script so the "status" operation 
exits with the proper return codes of 0 when the service is running and 3 when 
it is not"
   
https://bugs.launchpad.net/bugs/1076860/+attachment/3428393/+files/postgresql.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1076860

Title:
  PostgreSQL init script wrongly returns 0 for "status" when no clusters
  are running

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/postgresql-9.1/+bug/1076860/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to