Skip to content
Snippets Groups Projects
Commit 369f9a5c authored by Minh Diep's avatar Minh Diep Committed by Oleg Drokin
Browse files

LU-1254 iokit: should not use single '[]'


Single [] checking for empty variable is dangerous.
When the variable is undefined, it will fall through
without double quote

Signed-off-by: default avatarMinh Diep <mdiep@whamcloud.com>
Change-Id: Iec49cd704be8d106cce07032dc20f060f6044e8a
Reviewed-on: http://review.whamcloud.com/2373


Tested-by: Hudson
Tested-by: default avatarMaloo <whamcloud.maloo@gmail.com>
Reviewed-by: default avatarWei Liu <sarah@whamcloud.com>
Reviewed-by: default avatarYu Jian <yujian@whamcloud.com>
Reviewed-by: default avatarOleg Drokin <green@whamcloud.com>
parent c13874dd
No related branches found
No related tags found
No related merge requests found
......@@ -217,7 +217,7 @@ cleanup () {
shift
for ((i = 0; i < $ndevs; i++)); do
host=${host_names[$i]}
if [ -n ${do_teardown_ec[$i]} ]; then
if [[ -n "${do_teardown_ec[$i]}" ]]; then
teardown_ec_devno $host ${client_names[$i]}
fi
done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment