mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
syntax: Replace test == with = or -eq as appropriate.
Found by 'make syntax-check'.
(cherry picked from commit 6361810b53)
This commit is contained in:
@@ -44,7 +44,7 @@ fi
|
||||
|
||||
# If no arguments were specified and configure has run before, use the previous
|
||||
# arguments
|
||||
if test $# == 0 && test -x ./config.status; then
|
||||
if test $# -eq 0 && test -x ./config.status; then
|
||||
./config.status --recheck
|
||||
else
|
||||
$CONFIGUREDIR/configure "$@"
|
||||
|
||||
@@ -114,28 +114,28 @@ for md in `../../fish/guestfish --remote list-md-devices`; do
|
||||
error=0
|
||||
case "$name" in
|
||||
*:r1t1)
|
||||
[ "$level" == "raid1" ] || error=1
|
||||
[ "$devices" == "2" ] || error=1
|
||||
[ "$level" = "raid1" ] || error=1
|
||||
[ "$devices" -eq 2 ] || error=1
|
||||
;;
|
||||
|
||||
*:r1t2)
|
||||
[ "$level" == "raid1" ] || error=1
|
||||
[ "$devices" == "2" ] || error=1
|
||||
[ "$level" = "raid1" ] || error=1
|
||||
[ "$devices" -eq 2 ] || error=1
|
||||
;;
|
||||
|
||||
*:r5t1)
|
||||
[ "$level" == "raid5" ] || error=1
|
||||
[ "$devices" == "4" ] || error=1
|
||||
[ "$level" = "raid5" ] || error=1
|
||||
[ "$devices" -eq 4 ] || error=1
|
||||
;;
|
||||
|
||||
*:r5t2)
|
||||
[ "$level" == "raid5" ] || error=1
|
||||
[ "$devices" == "3" ] || error=1
|
||||
[ "$level" = "raid5" ] || error=1
|
||||
[ "$devices" -eq 3 ] || error=1
|
||||
;;
|
||||
|
||||
*:r5t3)
|
||||
[ "$level" == "raid5" ] || error=1
|
||||
[ "$devices" == "2" ] || error=1
|
||||
[ "$level" = "raid5" ] || error=1
|
||||
[ "$devices" -eq 2 ] || error=1
|
||||
;;
|
||||
|
||||
*)
|
||||
@@ -145,7 +145,7 @@ for md in `../../fish/guestfish --remote list-md-devices`; do
|
||||
[[ "$uuid" =~ ([0-9a-f]{8}:){3}[0-9a-f]{8} ]] || error=1
|
||||
[ ! -z "$metadata" ] || error=1
|
||||
|
||||
if [ "$error" == "1" ]; then
|
||||
if [ "$error" -eq 1 ]; then
|
||||
echo "$0: Unexpected output from md-detail for device $md"
|
||||
cat md-detail.out
|
||||
../../fish/guestfish --remote exit
|
||||
|
||||
Reference in New Issue
Block a user