diff options
author | 2014-04-21 15:56:19 +0000 | |
---|---|---|
committer | 2014-04-21 15:56:19 +0000 | |
commit | 07760119d52515c4032e419b063ae6e73d1aa733 (patch) | |
tree | 28cca1b138e5120c58ac8f7d762c99ab957f4239 | |
parent | check perms on .ssh/id_ed25519; Fritjof Bornebusch (diff) | |
download | wireguard-openbsd-07760119d52515c4032e419b063ae6e73d1aa733.tar.xz wireguard-openbsd-07760119d52515c4032e419b063ae6e73d1aa733.zip |
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@
-rw-r--r-- | distrib/miniroot/install.sub | 4 |
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 } |