Subject: Re: improvements to mknod(8)
To: None <david@l8s.co.uk>
From: Ben Harris <bjh21@netbsd.org>
List: tech-userlevel
Date: 02/07/2003 18:32:30
In article <20030207174908.F7389@snowdrop.l8s.co.uk> you write:
>> While I think you're right that MAKEDEV could use some work, I'm not sure
>> that extending mknod is the way to go.  In particular, remember that in a
>> diskless environment, MAKEDEV usually gets run on the NFS server, which may
>> well not be running NetBSD, and even if it is running NetBSD is likely to be
>> a different architecture and version from the system whose /dev is being
>> populated.  MAKEDEV isn't as portable as it could be, but making it even
>> less portable would be a bad idea IMO.
>
>With the current system, init will run MAKEDEV in an mfs filesystem
>when bringing up the system.

Ooh yes, I'd forgotten about that hack.  In that case, I don't know that I
have any objection to making MAKEDEV utterly nonportable and lightning fast.
I'd be inclined to leave it as a shell script, though, just so it can begin
with something like:

if [ x`uname` != xNetBSD ]; then
    echo "This script must be run on the system for which you want to create"
    echo "the device nodes.  There's no need to run it before that system"
    echo "boots, since init(8) can fabricate /dev itself if necessary."
fi >&2

People (like me) will forget otherwise.

-- 
Ben Harris                                                   <bjh21@netbsd.org>
Portmaster, NetBSD/acorn26           <URL:http://www.netbsd.org/Ports/acorn26/>