commit | ff8cdb58bf54e1acadf544a02c5ccee08cc1c2d2 | [log] [tgz] |
---|---|---|
author | Saqib Khan <khansa@us.ibm.com> | Wed Feb 08 10:13:01 2017 -0600 |
committer | Patrick Williams <patrick@stwcx.xyz> | Thu Feb 16 23:12:02 2017 +0000 |
tree | ca6839baf5c1cd881665ab0953cecc839be844ec | |
parent | c11cbc53f875673cb88bc2c617e4fb412e6e51de [diff] |
meta-witherspoon: vcs-control: Add retries for rebinding ucd driver Resolves openbmc/openbmc#1059 Change-Id: Idf2584d9179b55e85f56513617ba6cb39b881395 Signed-off-by: Saqib Khan <khansa@us.ibm.com>
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post/ucd_disable_vcs.sh b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post/ucd_disable_vcs.sh index d0bc63c..0ce07ea 100644 --- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post/ucd_disable_vcs.sh +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/vcs-pre-post/ucd_disable_vcs.sh
@@ -27,7 +27,13 @@ i2cset -y 11 0x64 0x02 0x1A i # re-bind ucd driver -if [ -e $ucdpath ] -then - echo $ucd > $ucdpath/bind +ucd_retries="5" +if [ -e $ucdpath ]; then + i=0 + until [ $i -ge $ucd_retries ] || [ -e $ucdpath/$ucd ]; do + i=$((i+1)) + echo $ucd > $ucdpath/bind || ret=$? + done + if [ ! -e $ucdpath/$ucd ]; then exit $ret; fi fi +