Subject: MAKEDEV is not portable
To: None <port-sparc@netbsd.org>
From: Robert Evans <r.evans@ic.ac.uk>
List: port-sparc
Date: 01/02/1999 21:54:24
Hi,

MAKEDEV under NetBSD/SPARC appears to have been changed in the same
manner as MAKEDEV under NetBSD/sun3 to use features that are not
standard in other Bourne shells.

This is documented in PR port-sun3/4105, but what it boils down to is
that MAKEDEV cannot be run on a SunOS 4 or 5 server to create a
diskless environment to install another NetBSD/SPARC machine from (despite
what it says in the INSTALL file for NetBSD-1.3.3).

The two items that cause problems are the mathematical assignments such
as:
	n=$(($n + 1))
and the substitutions used to retrieve the unit number:
	unit=${i#sd}

Is it possible to back out these changes?  Efficiency is not a great
concern for something like MAKEDEV...  :-)

If I patch up a copy of MAKEDEV, would the changes get folded back if I
submitted them?

(A closer look suggests that the MAKEDEV for other ports also uses the
same constructions.)

Cheers,
Robert