As my test, "if [  $? -ne 0 ]; then"  is not equal to "if sg_persist --in --read-status $dev; then"