From: rpe Date: Mon, 21 Apr 2014 12:41:36 +0000 (+0000) Subject: NIFS is supposed to represent the number of configured interfaces. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ce8440241e5702a25b8901a5f28ca90cfccc3f8b;p=openbsd NIFS is supposed to represent the number of configured interfaces. If an interface got configured twice, NIFS must not be incremented. So count the number of hostname.if files instead. discussed with and OK krw@ --- diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index cb2d6d54a5a..18a3904427b 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.763 2014/04/20 15:53:57 rpe Exp $ +# $OpenBSD: install.sub,v 1.764 2014/04/21 12:41:36 rpe Exp $ # # Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback # All rights reserved. @@ -739,9 +739,10 @@ configure_ifs() { if [[ -f $_hn ]]; then chmod 640 $_hn - ((NIFS++)) : ${_first:=$_ifs} fi + + NIFS=0; for _hn in /tmp/hostname.*; do ((NIFS++)); done _p=done done }