From: rpe Date: Sun, 10 Aug 2014 20:54:17 +0000 (+0000) Subject: [] -> [[]] X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c05ab2cd29177af122468f1ccd2f78ad5578c8dd;p=openbsd [] -> [[]] OK krw@ "well ok" halex@ --- diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 801023c095f..a6b697be5a1 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.790 2014/08/10 16:32:28 rpe Exp $ +# $OpenBSD: install.sub,v 1.791 2014/08/10 20:54:17 rpe Exp $ # # Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback # All rights reserved. @@ -558,7 +558,7 @@ showcols() { mkdir -p $_cdir rm -rf -- $_cdir/* while read _l; do - [ "$_l" ] || continue + [[ -n $_l ]] || continue mkdir -p /tmp/cdir/"$_l" _clist[${#_clist[*]}]="$_l" done @@ -1654,7 +1654,7 @@ munge_fstab() { done /etc/fstab # If no /etc/fstab was created, we have nowhere to $MODE to. - if [ ! -s /etc/fstab ]; then + if [[ ! -s /etc/fstab ]]; then echo "Unable to create valid /etc/fstab." exit fi @@ -1668,7 +1668,7 @@ mount_fs() { while read _dev _mp _fstype _opt _rest; do # If not the root filesystem, make sure the mount # point is present. - [ "$_mp" = "/mnt" ] || mkdir -p $_mp + [[ $_mp == /mnt ]] || mkdir -p $_mp # Mount the filesystem. Remember any failure. _msg=$(mount -v -t $_fstype $_async -o $_opt $_dev $_mp) || @@ -1710,7 +1710,7 @@ check_fs() { while read _dev _mp _fstype _rest _rest _passno _rest; do _dn=$(getdevname "$_dev") [[ $ROOTDEV == @(${_dev#/dev/}|$_dn${_dev##*.}) ]] && continue - [ -f "/sbin/fsck_$_fstype" ] || continue + [[ -f /sbin/fsck_$_fstype ]] || continue # Make sure device exists before fsck'ing it. makedev "$_dn" || continue ((_passno > 0)) || continue @@ -1723,7 +1723,7 @@ check_fs() { fi done