[Linux-PowerEdge] FW: problem with http://linux.dell.com/files/openmanage-contributions/om71-firmware-live/

Stephen Dowdy sdowdy at ucar.edu
Tue Mar 19 17:28:33 CDT 2013

Daniel Jared Dominguez wrote, On 03/19/2013 03:51 PM:
> A bit of a hack, but you can try using this. I manually patched OMSA
> 7.0 to fix this. The issue is that Ubuntu and Debian use dash instead of
> bash for /bin/sh. An alternative is use update-alternatives to use bash
> instead.
> http://linux.dell.com/files/openmanage-ubuntu/65binsh/unbinsh.sh
> --Jared

FWIW, on the issue of Dell's scripts not being POSIX compliant,
AND the fact that running the BCM NETWORK DUP scripts like:

     NETW_.....BIN -c

to check the firmware levels reboots your Debian system out from
under you due to the bashisms and inadequate error checks...
(to be somewhat gracious here, the latest 7.x broadcom DUP kits
actually correctly update all 4 NICs on my PER710s properly!)

i created a script called "dup_run_debian" that execs all the Dell
DUPs by temporarily switching the system to bash-as-bin-sh.
(this is a temporary wrapper hack, not something to solve your OMSA
issue, which 'unbinsh.sh' would do..

the core of it is:
(and the commented debconf lines are the way to programmatically
switcheroo dash-as-bin-sh w/o update-alternatives prompting)

# dup_run_debian

debug() { [ "${DEBUG:-0}" != 0 ] && printf "DEBUG: %s\n" "$*" 1>&2 ;}

dupbin=${1:?Must Specify a Dell DUP .BIN file to invoke}
if [ ! -r "${dupbin}" ]; then
    echo "Oops, i can not find the DUP kit specified.  aborting..."
    exit 2

if [ "$(lsb_release -is)" = "Debian" ]; then
#??? use approved Debian set-selections and dpkg-reconfigure
#??? set_dash_as_sh() { echo "dash    dash/sh boolean true" | debconf-set-selections ;  dpkg-reconfigure -fnoninteractive dash >/dev/null 2>&1 ;}
#??? set_bash_as_sh() { echo "dash    dash/sh boolean false" | debconf-set-selections ;  dpkg-reconfigure -fnoninteractive dash >/dev/null 2>&1 ;}
# instead just use big-hammer method...
set_dash_as_sh() { debug "set_dash_as_sh() called" ; /bin/ln -sf dash /bin/sh ;}
set_bash_as_sh() { debug "set_bash_as_sh() called" ; /bin/ln -sf bash /bin/sh ;}
    trap "exit" INT

#??? dash_as_sh=$(eval "$(debconf-get-selections 2>/dev/null | grep '^dash[[:space:]]\+dash/sh[[:space:]]\+boolean[[:space:]]\+')" : '.*[[:space:]]\+(true|false)'

shlink="$(readlink /bin/sh)"

    if [ "${shlink}" = "dash" ]; then
        trap "set_dash_as_sh" 0
        echo "/bin/sh appears to be dash, setting it to use BASH, because Dell's sh scripts are non-POSIX and break systems"
        if ! set_bash_as_sh; then
            error "Ouch, attempting to set /bin/sh as bash failed, aborting..."
            exit 1

# For Dell DUPs, we often require IPMI modules being loaded beforehand
for i in si devintf msghandler; do modprobe ipmi_${i}; done

if ! /bin/bash "${dupbin}" "$@"; then
    error "${dupbin} execution MAY have failed, sorry"

Stephen Dowdy  -  Systems Administrator  -  NCAR/RAL
303.497.2869   -  sdowdy at ucar.edu        -  http://www.ral.ucar.edu/~sdowdy/

More information about the Linux-PowerEdge mailing list