pgsql resource agent uses == in test operator

Bug #957913 reported by Andrew Mobbs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
resource-agents (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

OS release: Ubuntu 12.04 beta
Package: pacemaker

The pgsql OCF resource agent (/usr/lib/ocf/resource.d/heartbeat/pgsql) uses == in a test operator on line 647. This is a bashism, and fails as the interpreter is /bin/sh which is dash in Ubuntu.

The following patch fixes this issue:
--- pgsql.old 2012-03-17 00:10:26.368857162 +0000
+++ pgsql 2012-03-17 00:10:37.116721741 +0000
@@ -644,7 +644,7 @@
 pgsql_validate_all
 rc=$?

-[ "$1" == "validate-all" ] && exit $rc
+[ "$1" = "validate-all" ] && exit $rc

 if [ $rc -ne 0 ]
 then

Revision history for this message
Adam Gandelman (gandelman-a) wrote :

Andrew-

Thanks for reporting and helping make Ubuntu better! There was an upstream commit that addressed this [1] which we should consider carrying going into 12.04. Lars also committed a couple of other trivial bashism fixes to other RAs that address the same issue for other services. Considering carrying those in the same patch since they affect Ubuntu, especially

https://github.com/ClusterLabs/resource-agents/commit/6a53fbb3e723483bb1003529debc507154ce3509

affects: pacemaker (Ubuntu) → resource-agents (Ubuntu)
Changed in resource-agents (Ubuntu):
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package resource-agents - 1:3.9.2-5ubuntu3

---------------
resource-agents (1:3.9.2-5ubuntu3) precise; urgency=low

  * debian/patches/pgsql-fix_bashism.patch: Cherry-picked from upstream,
    fixes a bashism in pgsql RA that causes failures /w dash. (LP: #957913)
 -- Adam Gandelman <email address hidden> Mon, 02 Apr 2012 10:35:42 -0700

Changed in resource-agents (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.