summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2014-06-30 20:03:05 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2014-07-02 10:45:41 +0200
commit6f6900d457afdf8533968f6cd639d4b14779ad51 (patch)
tree801ba32236c50ec021890fa642ec7b80276449c0 /scripts
parent7bdf4719e8327a74262e47adfe78ad81a26ff4c0 (diff)
downloadlvm2-6f6900d457afdf8533968f6cd639d4b14779ad51.tar.gz
fsadm: avoid using -a in test
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/fsadm.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh
index e6fe7ce3c..f4ea796fd 100755
--- a/scripts/fsadm.sh
+++ b/scripts/fsadm.sh
@@ -276,7 +276,7 @@ try_umount() {
}
validate_parsing() {
- test -n "$BLOCKSIZE" -a -n "$BLOCKCOUNT" || error "Cannot parse $1 output"
+ test -n "$BLOCKSIZE" && test -n "$BLOCKCOUNT" || error "Cannot parse $1 output"
}
####################################
# Resize ext2/ext3/ext4 filesystem
@@ -459,12 +459,12 @@ trap "cleanup 2" 2
test -n "$FSADM_RUNNING" && exit 0
# test some prerequisities
-test -n "$TUNE_EXT" -a -n "$RESIZE_EXT" -a -n "$TUNE_REISER" -a -n "$RESIZE_REISER" \
- -a -n "$TUNE_XFS" -a -n "$RESIZE_XFS" -a -n "$MOUNT" -a -n "$UMOUNT" -a -n "$MKDIR" \
- -a -n "$RMDIR" -a -n "$BLOCKDEV" -a -n "$BLKID" -a -n "$GREP" -a -n "$READLINK" \
- -a -n "$DATE" -a -n "$FSCK" -a -n "$XFS_CHECK" -a -n "$XFS_REPAIR" \
- -a -n "$LVM" \
- || error "Required command definitions in the script are missing!"
+for i in "$TUNE_EXT" "$RESIZE_EXT" "$TUNE_REISER" "$RESIZE_REISER" \
+ "$TUNE_XFS" "$RESIZE_XFS" "$MOUNT" "$UMOUNT" "$MKDIR" \
+ "$RMDIR" "$BLOCKDEV" "$BLKID" "$GREP" "$READLINK" \
+ "$DATE" "$FSCK" "$XFS_CHECK" "$XFS_REPAIR" "$LVM" ; do
+ test -n "$i" || error "Required command definitions in the script are missing!"
+done
"$LVM" version >"$NULL" 2>&1 || error "Could not run lvm binary \"$LVM\""
$("$READLINK" -e / >"$NULL" 2>&1) || READLINK_E="-f"