Subject: overriding MAKEDEV.tmpl
To: None <>
From: Brett Lymn <>
List: current-users
Date: 12/24/2007 00:58:32
Content-Disposition: inline
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit


I was building a custom cdrom and found that I needed more disk drive
device nodes but could not create them because I was running out of inodes
on the ramdisk image.  I found there were a lot of dev nodes in /dev
that I really did not need but since they were in the MAKEDEV.tmpl I
could not prevent them from being created (yes, I did find the arch
dependent MAKEDEV but that does not override enough).  To get around
the problem I made a small change to etc/Makefile to allow the
MAKEDEV.tmpl file to be overridden with a custom version.  This allows
me to change the mix of device nodes created in /dev in the ramdisk
image.  Is this worth committing?  or could I have done this another

Brett Lymn
The information contained in this email and any attached files is
confidential to BAE Systems Australia. If you are not the intended
recipient, any use, disclosure or copying of this email or any
attachments is expressly prohibited.  If you have received this email
in error, please notify us immediately. VIRUS: Every care has been
taken to ensure this email and its attachments are virus free,
however, any loss or damage incurred in using this email is not the
sender's responsibility.  It is your responsibility to ensure virus
checks are completed before installing any data sent in this email to
your computer."

Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="makefile.diff"

Index: etc/Makefile
RCS file: /cvsroot/src/etc/Makefile,v
retrieving revision 1.345
diff -u -r1.345 Makefile
--- etc/Makefile	14 Jul 2007 19:53:52 -0000	1.345
+++ etc/Makefile	23 Dec 2007 13:37:45 -0000
@@ -15,6 +15,8 @@
 #	${KERNSRCDIR}/arch/${MACHINE}/compile, but can be overridden.
 #   KERNCONFDIR is where the configuration files for kernels are found;
 #	default is ${KERNSRCDIR}/arch/${MACHINE}/conf but can be overridden.
+#   MAKEDEV_TMPL is the template for generating the MAKEDEV script, the
+#	default is ${.CURDIR}/MAKEDEV.tmpl
 #   MKCRYPTO; if not `no', install crypto-related configuration
 #   MKPOSTFIX; if not `no', install postfix configuration
 #   MKUNPRIVED; if not `no', allow non-root installs.
@@ -48,6 +50,10 @@
+.if !defined(MAKEDEV_TMPL)
 # Flags for creating ISO CDROM image
 # mkisofs is expected to be in $PATH, install via pkgsrc/sysutils/cdrtools
 # Note: At least mkisofs 2.0 should be used.
@@ -170,7 +176,7 @@
-	    awk -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl > ${.TARGET}
+	    awk -f ${.CURDIR}/MAKEDEV.awk ${MAKEDEV_TMPL} > ${.TARGET}