From: Kefu Chai Date: Wed, 26 May 2021 06:02:51 +0000 (+0800) Subject: vstart.sh: use || instead of "-o" X-Git-Tag: v17.1.0~1837^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bf3ea637c16413b5d4dca19205d0463616e82bd4;p=ceph.git vstart.sh: use || instead of "-o" to silence the warning like: SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. see also https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html Signed-off-by: Kefu Chai --- diff --git a/src/vstart.sh b/src/vstart.sh index 8bd32bd07461..c7797025d688 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -253,9 +253,10 @@ parse_block_devs() { shift local devs=$1 shift + local dev IFS=',' read -r -a block_devs <<< "$devs" for dev in "${block_devs[@]}"; do - if [ ! -b $dev -o ! -w $dev ]; then + if [ ! -b $dev ] || [ ! -w $dev ]; then echo "All $opt_name must refer to writable block devices" exit 1 fi