Subject: Re: install/37498: bug in MAKEDEV
To: None <email@example.com>
From: Alan Barrett <firstname.lastname@example.org>
Date: 12/08/2007 19:29:36
On Sat, 08 Dec 2007, David Laight wrote:
> > count_nodes=$(($count_nodes + $(sh "$0.local" $opts -s all | wc -l)))
Sorry, we can't rely on "wc -l" being available. MAKEDEV is sometimes
called from init(8) before the /usr file system is mounted.
> set -- `sh "$0.local" $opts -s all`
> count_nodes=$((count_nodes + $#))
> (Except that getting \n into IFS isn;t that easy)
Getting a newline into IFS is easy enough. I just checked in a fix
based on this idea, but using a shell function to count the lines.
--apb (Alan Barrett)