svn commit: r319987 - head/etc

Stephen J. Kiernan stevek at FreeBSD.org
Thu Jun 15 20:06:42 UTC 2017


Author: stevek
Date: Thu Jun 15 20:06:41 2017
New Revision: 319987
URL: https://svnweb.freebsd.org/changeset/base/319987

Log:
  Replace md(4) usage in diskless(8) script rc.initdiskless with tmpfs(5).
  Need to multiply the size of the disk passed to mount_md by 512 as mdmfs
  expects number of 512-byte blocks while tmpfs size option wants number of
  bytes.
  
  Reviewed by:	brooks
  Approved by:	sjg (mentor)
  Obtained from:	Juniper Networks, Inc.
  Differential Revision:	https://reviews.freebsd.org/D11106

Modified:
  head/etc/rc.initdiskless

Modified: head/etc/rc.initdiskless
==============================================================================
--- head/etc/rc.initdiskless	Thu Jun 15 19:56:59 2017	(r319986)
+++ head/etc/rc.initdiskless	Thu Jun 15 20:06:41 2017	(r319987)
@@ -195,10 +195,10 @@ handle_remount() { # $1 = mount point
     to_umount="$b ${to_umount}"
 }
 
-# Create a generic memory disk
+# Create a generic memory disk (using tmpfs)
 #
 mount_md() {
-    /sbin/mdmfs -S -i 4096 -s $1 -M md $2
+    mount -t tmpfs -o size=$(($1 * 512)) tmpfs $2
 }
 
 # Create the memory filesystem if it has not already been created


More information about the svn-src-all mailing list