[LTCTest][Opal][OP820] update_flash -d option is throwing /usr/sbin/update_flash_nv: 595: [: x47: unexpected operator
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
powerpc-utils (Ubuntu) |
Fix Released
|
Undecided
|
Taco Screen team | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[SRU Justification]
On an OpenPower system, '/usr/sbin/
[Test case]
1. On an OpenPower system (as determined by the presence of the file /proc/device-
2. Install powerpc-utils from xenial-proposed.
3. Run 'sudo update_flash_nv -d' again. Verify that no error message is printed.
[Regression potential]
Minimal. This is a targeted, one-line fix for a bashism in a shell script.
---Problem Description---
update_flash -d option is throwing [: x47: unexpected operator message
---uname output---
Linux ltc-garri2 4.4.0-30-generic #49-Ubuntu SMP Fri Jul 1 10:00:36 UTC 2016 ppc64le ppc64le ppc64le GNU/Linux
Machine Type = P8
---Steps to Reproduce---
Install a P8 8335-GTB Hardware with Ubuntu 16.04.1 OS.
Then execute the below command to check the version of the firmware installed on the machine.
root@ltc-garri2:~# update_flash -d
/usr/sbin/
Firmware version:
Product Name : OpenPOWER Firmware
Product Version : IBM-garrison-
Product Extra : op-build-dcacfac
Product Extra : buildroot-bc248fa
Product Extra : skiboot-5f25590
Product Extra : hostboot-
Product Extra : linux-4.
Product Extra : petitboot-
Product Extra : garrison-
Product Extra : occ-19a3ebc
Product Extra : hostboot-binar
root@ltc-garri2:~# echo $?
0
root@ltc-garri2:~# which update_flash
/usr/sbin/
root@ltc-garri2:~# dpkg -S /usr/sbin/
powerpc-ibm-utils: /usr/sbin/
root@ltc-garri2:~# dpkg --list | grep powerpc-ibm-utils
ii powerpc-ibm-utils 1.3.1-2 ppc64el utilities for maintenance of IBM PowerPC platforms
Userspace tool common name: /usr/sbin/
The userspace tool has the following bit modes: 64-bit
Userspace package: powerpc-ibm-utils
Below upstream patch fixes this issue:
commit c3269d4e3d4882f
Author: Vasant Hegde <email address hidden>
Date: Thu Jun 30 10:26:58 2016 -0400
update_flash: Fix bashism issue in opp_display_
Ubuntu uses dash, not bash. We hit below warning on Ubuntu system.
root@
/usr/
Firmware version:
....
....
== is a bashism. Replace it with =.
Fixes: 767e3dd7 (update_flash: Add support for OpenPower system)
Signed-off-by: Vasant Hegde <email address hidden>
-Vasant
tags: | added: architecture-ppc64le bugnameltc-143371 severity-high targetmilestone-inin16041 |
Changed in ubuntu: | |
assignee: | nobody → Taco Screen team (taco-screen-team) |
affects: | ubuntu → powerpc-ibm-utils (Ubuntu) |
affects: | powerpc-ibm-utils (Ubuntu) → powerpc-utils (Ubuntu) |
description: | updated |
affects: | powerpc-utils (Ubuntu) → powerpc-ibm-utils (Ubuntu) |
affects: | powerpc-ibm-utils (Ubuntu) → powerpc-utils (Ubuntu) |
affects: | powerpc-utils (Ubuntu) → powerpc-ibm-utils (Ubuntu) |
affects: | powerpc-ibm-utils (Ubuntu) → powerpc-utils (Ubuntu) |
This bug was fixed in the package powerpc-utils - 1.3.1-2ubuntu1
---------------
powerpc-utils (1.3.1-2ubuntu1) yakkety; urgency=medium
* debian/ patches/ bashisms. patch: Fix bashism in update_flash_nv.
Closes LP: #1599191.
-- Steve Langasek <email address hidden> Tue, 05 Jul 2016 15:52:05 -0700