[Bug 1599191] [NEW] [LTCTest][Opal][OP820] update_flash -d option is throwing /usr/sbin/update_flash_nv: 595: [: x47: unexpected operator

Launchpad Bug Tracker 1599191 at bugs.launchpad.net
Tue Jul 5 14:50:39 UTC 2016


You have been subscribed to a public bug:

---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 at ltc-garri2:~# update_flash -d

/usr/sbin/update_flash_nv: 595: [: x47: unexpected operator
Firmware version:
 Product Name          : OpenPOWER Firmware
 Product Version       : IBM-garrison-ibm-OP8_v1.9_2.1
 Product Extra         :        op-build-dcacfac
 Product Extra         :        buildroot-bc248fa
 Product Extra         :        skiboot-5f25590
 Product Extra         :        hostboot-4c63029-6034fa6
 Product Extra         :        linux-4.4.9-openpower2-ebc7b6d
 Product Extra         :        petitboot-v1.1.1-fc477ec
 Product Extra         :        garrison-xml-b453a81
 Product Extra         :        occ-19a3ebc
 Product Extra         :        hostboot-binar
root at ltc-garri2:~# echo $?
0

root at ltc-garri2:~# which update_flash
/usr/sbin/update_flash

root at ltc-garri2:~# dpkg -S /usr/sbin/update_flash
powerpc-ibm-utils: /usr/sbin/update_flash
root at 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/update_flash 
 
The userspace tool has the following bit modes: 64-bit 

Userspace package: powerpc-ibm-utils

Below upstream patch fixes this issue:

commit c3269d4e3d4882fd931d1df6aece0bec86fb6734
Author: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
Date:   Thu Jun 30 10:26:58 2016 -0400

    update_flash: Fix bashism issue in opp_display_current_fw_version()
    
    Ubuntu uses dash, not bash. We hit below warning on Ubuntu system.
    
    root at abc:/sys/firmware/devicetree/base/ibm,opal/sensors# update_flash -d
    /usr/sbin/update_flash_nv: 595: [: x43: unexpected operator
    Firmware version:
    ....
    ....
    
    == is a bashism. Replace it with =.
    
    Fixes: 767e3dd7 (update_flash: Add support for OpenPower system)
    Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>


-Vasant

** Affects: powerpc-ibm-utils (Ubuntu)
     Importance: Undecided
     Assignee: Taco Screen team (taco-screen-team)
         Status: New


** Tags: architecture-ppc64le bugnameltc-143371 severity-high targetmilestone-inin16041
-- 
[LTCTest][Opal][OP820] update_flash -d option is throwing /usr/sbin/update_flash_nv: 595: [: x47: unexpected operator
https://bugs.launchpad.net/bugs/1599191
You received this bug notification because you are a member of Ubuntu Foundations Bugs, which is subscribed to powerpc-ibm-utils in Ubuntu.



More information about the foundations-bugs mailing list