diff options
author | 2012-09-28 15:48:05 +0000 | |
---|---|---|
committer | 2012-09-28 15:48:05 +0000 | |
commit | adcc51dcb8d18f754ff5244035016b2fd8c65433 (patch) | |
tree | 51b2f8e26847a1b5ccce459c30e37c5a8120991b | |
parent | use xmemdup() and xcalloc() helpers (diff) | |
download | wireguard-openbsd-adcc51dcb8d18f754ff5244035016b2fd8c65433.tar.xz wireguard-openbsd-adcc51dcb8d18f754ff5244035016b2fd8c65433.zip |
replace _fsent array with a simple concatenated list
ok halex@
-rw-r--r-- | distrib/miniroot/install.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh index a5079b66e67..0e47a1dd3b4 100644 --- a/distrib/miniroot/install.sh +++ b/distrib/miniroot/install.sh @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sh,v 1.226 2012/09/03 07:34:37 deraadt Exp $ +# $OpenBSD: install.sh,v 1.227 2012/09/28 15:48:05 rpe Exp $ # $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $ # # Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback @@ -66,6 +66,7 @@ MODE=install DISK= DISKS_DONE= _DKDEVS=$(get_dkdevs) +_fsent= # Remove traces of previous install attempt. rm -f /tmp/fstab.shadow /tmp/fstab /tmp/fstab.* @@ -134,7 +135,6 @@ while :; do # Add ffs filesystems to list after newfs'ing them. Ignore # other filesystems. - _i=${#_fsent[*]} while read _pp _mp _fstype _rest; do [[ $_fstype == ffs ]] || continue _OPT= @@ -143,15 +143,14 @@ while :; do # N.B.: '!' is lexically < '/'. That is # required for correct sorting of # mount points. - _fsent[$_i]="$_mp!$_pp" - : $(( _i += 1 )) + _fsent="$_fsent $_mp!$_pp" done </tmp/fstab.$DISK fi done # Write fstab entries to fstab in mount point alphabetic order # to enforce a rational mount order. -for _mp in $(bsort ${_fsent[*]}); do +for _mp in $(bsort $_fsent); do _pp=${_mp##*!} _mp=${_mp%!*} echo -n "$_pp $_mp ffs rw" |