diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2017-06-28 20:35:34 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2017-06-29 22:23:16 +0200 |
commit | ef4506069a1a29cd00532e36c24df9a01cd32600 (patch) | |
tree | 64b584467272319474967e2fa98153dd27e75b0d /scripts/vgimportclone.sh | |
parent | 8dc29d7cc7e86295116a4fb401315896b6793fa8 (diff) | |
download | lvm2-ef4506069a1a29cd00532e36c24df9a01cd32600.tar.gz |
vgimportclone.sh: use well defined tests
Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
Diffstat (limited to 'scripts/vgimportclone.sh')
-rwxr-xr-x | scripts/vgimportclone.sh | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/vgimportclone.sh b/scripts/vgimportclone.sh index ac52f01a8..7d3118fcb 100755 --- a/scripts/vgimportclone.sh +++ b/scripts/vgimportclone.sh @@ -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 |