summaryrefslogtreecommitdiff
path: root/distrib/miniroot/install.sub
diff options
context:
space:
mode:
authorRobert Peichaer <rpe@cvs.openbsd.org>2014-04-21 15:56:20 +0000
committerRobert Peichaer <rpe@cvs.openbsd.org>2014-04-21 15:56:20 +0000
commit29d76afe226b9534fbb049af141b8ef4a33cea4d (patch)
tree94785079ff9b2441784b35b4963cb0a12ac1329a /distrib/miniroot/install.sub
parent6f7918afbcf9768c6a2dce4507191ecb5caccd89 (diff)
Use a better way that ensures that NIFS is really 0 if there are no
hostname.if files. suggested by and OK halex@ OK krw@
Diffstat (limited to 'distrib/miniroot/install.sub')
-rw-r--r--distrib/miniroot/install.sub4
1 files changed, 2 insertions, 2 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index 18a3904427b..865153bedb5 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,4 +1,4 @@
-# $OpenBSD: install.sub,v 1.764 2014/04/21 12:41:36 rpe Exp $
+# $OpenBSD: install.sub,v 1.765 2014/04/21 15:56:19 rpe Exp $
#
# Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback
# All rights reserved.
@@ -742,7 +742,7 @@ configure_ifs() {
: ${_first:=$_ifs}
fi
- NIFS=0; for _hn in /tmp/hostname.*; do ((NIFS++)); done
+ NIFS=$(ls -1 /tmp/hostname.* 2>/dev/null | grep -c ^)
_p=done
done
}