openipmi fails to start with 'unexpected operator' in /etc/init.d/openinit

Bug #1844448 reported by Justin Greever
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openipmi (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

OS Release: Ubuntu 19.04
Package: openipmi
Version: 2.0.25-2.1ubuntu1

Expected results:
update system, install openipmi, start openipmi via systemctl

Actual results:
update system, install openipmi, start openipmi via systemctl, greeted with an error message and openipmi fails to start

Steps to reproduce issue:
1. fresh install of ubuntu 19.04.
2. sudo apt update && sudo apt upgrade
3. sudo apt install openipmi
4. sudo systemctl start openipmi
5. openipmi fails to start with error "Sep 17 12:25:08 anthrax openipmi[1347]: /etc/init.d/openipmi: 55: [: 5.2: unexpected operator" via journalctl -xe

Line 55 in /etc/init.d/openipmi is:
if [ "${kernel}" == "2.4" ]; then

Steps to fix the issue:
edit /etc/init.d/openipmi
go to line 55 and change the == to a single =
save file
perform systemctl daemon-reload
perform systemctl start openipmi
openipmi starts without issues/errors
verify with systemctl status openipmi

Tags: openipmi

Related branches

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi Justin,
I just came by openipmi today and was looking at the bugs.
I can confirm yours - easy to be reproduced.

Changed in openipmi (Ubuntu):
status: New → Confirmed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

That should be https://sourceforge.net/p/openipmi/code/ci/d7ac7a37321357d17fb581e9b7782f787334919b/
Which is interesting as this should be in 2.0.25 by upstream ...

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

The package seems to carry an outdated local copy ... grml

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

The init scripts have diverged a lot and I'm not going to do historical research for ages ont his.
To help for now I'll pass through the last bunch of upstream fixes to the init script and port those to Ubuntu.

Changed in openipmi (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Ok, with the fixes in place it is much better.
If you happen to test on a container without devices you still get a fail, but a much more reasonable one than a syntax error.

Nov 28 17:46:24 f systemd[1]: Starting LSB: OpenIPMI Driver init script...
Nov 28 17:46:24 f openipmi[29057]: * Starting ipmi drivers
Nov 28 17:46:24 f openipmi[29057]: ...fail!
Nov 28 17:46:24 f openipmi[29057]: ...done.
Nov 28 17:46:24 f systemd[1]: openipmi.service: Control process exited, code=exited, status=1/FAILURE
Nov 28 17:46:24 f systemd[1]: openipmi.service: Failed with result 'exit-code'.
Nov 28 17:46:24 f systemd[1]: Failed to start LSB: OpenIPMI Driver init script.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I combined it with an upgrade to 2.0.27 for further fixes and opened an MP for review
=> https://code.launchpad.net/~usd-import-team/ubuntu/+source/openipmi/+git/openipmi/+merge/376170

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openipmi - 2.0.27-0ubuntu1

---------------
openipmi (2.0.27-0ubuntu1) focal; urgency=medium

  * New upstream release 2.0.27
    - d/rules: disable the now default-on python support
    - d/control: now needs libreadline-dev as build-depends
    - d/p/sample-fix-readline-include-in-ipmi_serial_bmc_emu.c.patch: fix
      FTBFS due to readline include in ipmi_serial_bmc_emu.c
  * d/openipmi.init: fix various issues identified upstream (LP: #1844448)

 -- Christian Ehrhardt <email address hidden> Thu, 28 Nov 2019 14:12:35 +0100

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

Other bug subscribers