diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2003-07-03 15:19:02 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2003-07-03 15:19:02 +0000 |
commit | b01d48c75cd044bec000b2682137875f03bd8efd (patch) | |
tree | 3a72c4dc219d76c9c05d02c8c8c7220772104e50 /distrib | |
parent | 301837eca0e4b2482aac1646cb809cc11b666f67 (diff) |
Use numeric comparison operators when testing numeric values.
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/miniroot/install.sh | 4 | ||||
-rw-r--r-- | distrib/miniroot/install.sub | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh index e9e4db25c60..f6db8f15d21 100644 --- a/distrib/miniroot/install.sh +++ b/distrib/miniroot/install.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: install.sh,v 1.133 2003/07/02 16:42:19 krw Exp $ +# $OpenBSD: install.sh,v 1.134 2003/07/03 15:19:01 krw Exp $ # $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $ # # Copyright (c) 1997-2002 Todd Miller, Theo de Raadt, Ken Westerback @@ -174,7 +174,7 @@ if [ ! -f /etc/fstab ]; then fi # If there are no BSD partitions, or $DISK has been reset, go on to next disk. - [[ ${#_partitions[*]} > 0 && -n $DISK ]] || continue + [[ ${#_partitions[*]} -gt 0 && -n $DISK ]] || continue # Now prompt the user for the mount points. Loop until "done" entered. _i=0 diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 903095b1687..2123bc1b86e 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.311 2003/07/03 13:42:03 krw Exp $ +# $OpenBSD: install.sub,v 1.312 2003/07/03 15:19:01 krw Exp $ # $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $ # # Copyright (c) 1997-2003 Todd Miller, Theo de Raadt, Ken Westerback @@ -239,7 +239,7 @@ ask_which () { local _name=$1 _query=$2 _devs=$3 _defdev=$4 set -- $_devs - if [[ $# < 1 ]]; then + if [[ $# -lt 1 ]]; then echo "Done - no available ${_name}s found." resp=done return @@ -302,7 +302,7 @@ rmel() { bsort() { local _l _a=$1 _b - [[ $# > 0 ]] || return + [[ $# -gt 0 ]] || return shift for _b; do @@ -419,7 +419,7 @@ fi SWAPDEV= set -- $DKDEVS - [[ $# > 1 ]] && _defdsk=done + [[ $# -gt 1 ]] && _defdsk=done ask_which "disk" "is the root disk?" "$DKDEVS" "$_defdsk" [[ $resp == done ]] && exit @@ -642,7 +642,7 @@ __EOT isalphanumeric() { local _n _n=$1 - while [ ${#_n} != 0 ]; do + while [[ ${#_n} -ne 0 ]]; do case $_n in [A-Za-z0-9]*) ;; *) return 1;; @@ -922,7 +922,7 @@ install_url() { # as a line number in $SERVERLIST. [[ -s $SERVERLIST ]] || continue set -- $(sed -ne "${resp}p" $SERVERLIST) - [[ $# < 1 ]] && { echo "There is no line $resp." ; continue ; } + [[ $# -lt 1 ]] && { echo "There is no line $resp." ; continue ; } echo "Using $*" eval _${_url_type}_server_ip=${1%%/*} eval _${_url_type}_server_dir=${1#*/}/$SETDIR |