From: rpe Date: Mon, 21 Apr 2014 15:56:19 +0000 (+0000) Subject: Use a better way that ensures that NIFS is really 0 if there are no X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=07760119d52515c4032e419b063ae6e73d1aa733;p=openbsd 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@ --- 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 }