Fixes #3985: Move r29949 to v1.7 branch (fix bash comparison to work)

---svn-pre-commit-ignore-below---

r29949 [[BR]]
fix bash comparison to work as expected
cmr=v1.7.4:reviewer=ompi-gk1.7
Fixes #3991: Move r29954 to v1.7 branch (Update the default ranking policy)

---svn-pre-commit-ignore-below---

r29954 [[BR]]
Update the default ranking policy

cmr=v1.7.4:reviewer=ompi-gk1.7