Subject: Re: install/37498: bug in MAKEDEV
To: None <install-manager@netbsd.org, gnats-admin@netbsd.org,>
From: David Laight <david@l8s.co.uk>
List: netbsd-bugs
Date: 12/08/2007 00:45:02
The following reply was made to PR install/37498; it has been noted by GNATS.
From: David Laight <david@l8s.co.uk>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: install/37498: bug in MAKEDEV
Date: Sat, 8 Dec 2007 00:48:38 +0000
On Fri, Dec 07, 2007 at 11:35:00PM +0000, dlagno@rambler.ru wrote:
> >Fix:
> in src/etc/MAKEDEV.tmpl replace
>
> sh "$0.local" $opts -s all | \
> while read l; do
> count_nodes=$((count_nodes + 1))
> done
>
> with
>
> count_nodes=$(($count_nodes + $(sh "$0.local" $opts -s all | wc -l)))
>
or:
oifs="$IFS"
IFS='\n'
set -- `sh "$0.local" $opts -s all`
count_nodes=$((count_nodes + $#))
IFS="$oifs"
(Except that getting \n into IFS isn;t that easy)
David
--
David Laight: david@l8s.co.uk