summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c13874d)
Single [] checking for empty variable is dangerous.
When the variable is undefined, it will fall through
without double quote
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: Iec49cd704be8d106cce07032dc20f060f6044e8a
Reviewed-on: http://review.whamcloud.com/2373
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
shift
for ((i = 0; i < $ndevs; i++)); do
host=${host_names[$i]}
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
teardown_ec_devno $host ${client_names[$i]}
fi
done