[PATCH v2 28/49] bash scripts: fix redundant exit code check