]> sourceware.org Git - lvm2.git/commitdiff
vgimportclone.sh: use well defined tests
authorZdenek Kabelac <zkabelac@redhat.com>
Wed, 28 Jun 2017 18:35:34 +0000 (20:35 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Thu, 29 Jun 2017 20:23:16 +0000 (22:23 +0200)
Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.

scripts/vgimportclone.sh

index ac52f01a8461dbdd636fe5a0dfb9bb074a7364b4..7d3118fcbe5d450d67bbc5e7978d3390dd9fa608 100755 (executable)
@@ -95,8 +95,7 @@ function cleanup {
 SCRIPTNAME=$("$BASENAME" "$0")
 
 
-if [ "$UID" != "0" -a "$EUID" != "0" ]
-then
+if [ "$UID" != 0 ] && [ "$EUID" != 0 ]; then
     die 3 "${SCRIPTNAME} must be run as root."
 fi
 
@@ -183,14 +182,13 @@ do
 done
 
 # turn on DEBUG (special case associated with -v use)
-if [ -z "$DEBUG" -a $VERBOSE_COUNT -gt 3 ]; then
+if [ -z "$DEBUG" ] && [ "$VERBOSE_COUNT" -gt 3 ]; then
     DEBUG="-d"
     set -x
 fi
 
 # setup LVM_OPTS
-if [ -n "${DEBUG}" -o -n "${VERBOSE}" ]
-then
+if [ -n "$DEBUG" ] || [ -n "$VERBOSE" ]; then
     LVM_OPTS="${LVM_OPTS} ${DEBUG} ${VERBOSE}"
 fi
 
This page took 0.036525 seconds and 5 git commands to generate.