master - vgimportclone.sh: use well defined tests
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ef4506069a1a29cd00532e36c24df9a01cd32600 Commit: ef4506069a1a29cd00532e36c24df9a01cd32600 Parent: 8dc29d7cc7e86295116a4fb401315896b6793fa8 Author: Zdenek Kabelac <[email protected]> AuthorDate: Wed Jun 28 20:35:34 2017 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Thu Jun 29 22:23:16 2017 +0200
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.
--- scripts/vgimportclone.sh | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-)
scripts/vgimportclone.sh +3 -5
@@ -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