Subject: Re: non-native MAKEDEV [was: Re: CVS commit: basesrc]
To: Allen Briggs <briggs@ninthwonder.com>
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
List: source-changes
Date: 10/07/1999 16:21:04
On Thu, 7 Oct 1999, Allen Briggs wrote:
> for chown_sep in ':' '.' ; do
> 	touch /tmp/test_chown
> 	if chown root${chown_sep}sys /tmp/test_chown 2>/dev/null ; then
>         	break
> 	fi
> 	rm /tmp/test_chown
> done
> 
> And then change all chowns appropriately.  Using a single chown instead
> of chown/chgrp is definitely faster for speed-challenged ports/disks.

 - a MAKEDEV run is something one does (usually) once only, so
   optimisation for speed is not the primary goal here
 - if anything, the test-file should not be generated in /tmp (or some
   possible netboot-server!), but in . (the new /dev), preventing to
   overwrite anything without a real need. 
 - i think another portable solution would really be to just split this
   into seperate chown & chgrp commands. One could do this with the aid of
   some shell function, but I'm not sure how portable that is.


 - Hubert

-- 
NetBSD - Better for your uptime than Viagra