Syntax error in /usr/lib/stonith/plugins/external/ipmi (used by command stonith)

Bug #243712 reported by Patrik Lermon
4
Affects Status Importance Assigned to Milestone
heartbeat (Ubuntu)
Fix Released
Medium
Luca Falavigna

Bug Description

Binary package hint: heartbeat

When running the command "stonith -h" there are syntax errors printed on STDERR.
To reproduce, filter out STDOUT, i.e. run the command like this:

$ stonith -h > /dev/null
/usr/lib/stonith/plugins/external/ipmi: 38: Syntax error: "(" unexpected
/usr/lib/stonith/plugins/external/ipmi: 38: Syntax error: "(" unexpected
/usr/lib/stonith/plugins/external/ipmi: 38: Syntax error: "(" unexpected

Row 38 in /usr/lib/stonith/plugins/external/ipmi looks like this:
function have_ipmi() {

it seems that this type of function declaration is not compatible with the default /bin/sh in Ubuntu 8.04 desktop.

If I change the first row in the ipmi script FROM:
#!/bin/sh
TO:
#!/bin/bash
the error goes away (because bash is compatible with this function declaration).

I don't know what is the correct solution,
- either convert this to a bash script, or
- make the function declarations /bin/sh compatible

Changed in heartbeat:
assignee: nobody → dktrkranz
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package heartbeat - 2.1.3-6ubuntu2

---------------
heartbeat (2.1.3-6ubuntu2) intrepid; urgency=low

  * debian/patches/more_bashisms.patch:
    - Adjusted to fix other bashisms (LP: #243712).

 -- Luca Falavigna <email address hidden> Sun, 29 Jun 2008 10:07:26 +0200

Changed in heartbeat:
status: Confirmed → 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.