summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrpe <rpe@openbsd.org>2014-08-10 20:54:17 +0000
committerrpe <rpe@openbsd.org>2014-08-10 20:54:17 +0000
commitc05ab2cd29177af122468f1ccd2f78ad5578c8dd (patch)
tree9393428524445c5a091dca09ae5e04fce85cdea1
parent- add -p to SYNOPSIS (diff)
downloadwireguard-openbsd-c05ab2cd29177af122468f1ccd2f78ad5578c8dd.tar.xz
wireguard-openbsd-c05ab2cd29177af122468f1ccd2f78ad5578c8dd.zip
[] -> [[]]
OK krw@ "well ok" halex@
-rw-r--r--distrib/miniroot/install.sub16
1 files changed, 8 insertions, 8 deletions
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 </tmp/fstab >/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 </etc/fstab
- [ "$_fail" ] && exit
+ [[ -n $_fail ]] && exit
}
# Extract fully qualified domain name from current hostname. If none is
@@ -1749,7 +1749,7 @@ donetconfig() {
# so it will eventually be copied to /mnt/etc/resolv.conf and will
# not in the meantime remove the user's ability to choose to use it
# or not, during the rest of the install.
- if [ -f /tmp/resolv.conf.shadow ]; then
+ if [[ -f /tmp/resolv.conf.shadow ]]; then
mv /tmp/resolv.conf.shadow /tmp/resolv.conf
# Get nameserver address(es). Store as a blank separated list.
for _n in $(grep '^nameserver ' /tmp/resolv.conf); do
@@ -1939,7 +1939,7 @@ finish_up() {
# dynamic. That is highly discouraged, but let us play it safe.
rm -f /mnt/var/run/ld.so.hints
- [ -x /mnt/$MODE.site ] && /mnt/usr/sbin/chroot /mnt /$MODE.site
+ [[ -x /mnt/$MODE.site ]] && /mnt/usr/sbin/chroot /mnt /$MODE.site
# In case this is a softraid device, make sure all underlying
# device nodes exist.