SVN: geninitrd/trunk/geninitrd

wiget wiget at pld-linux.org
Sat Dec 3 20:52:18 CET 2011


Author: wiget
Date: Sat Dec  3 20:52:18 2011
New Revision: 12424

Modified:
   geninitrd/trunk/geninitrd
Log:
Use devtmpfs on /dev

Mount devtmpfs on /dev and if fail fallback to tmpfs.

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd	(original)
+++ geninitrd/trunk/geninitrd	Sat Dec  3 20:52:18 2011
@@ -152,13 +152,17 @@
 	busybox_applet mount mknod mkdir
 	add_linuxrc <<-EOF
 		: 'Creating /dev'
-		mount -o mode=0755 -t tmpfs none /dev
-		mknod /dev/console c 5 1
-		mknod /dev/null c 1 3
-		mknod /dev/zero c 1 5
-		mknod /dev/random c 1 8
-		mknod /dev/snapshot c 10 231
-		mknod /dev/urandom c 1 9
+		if ! mount -t devtmpfs -o mode=0755,nosuid devtmpfs /dev > /dev/null 2>&1; then
+			mount -o mode=0755,nosuid -t tmpfs tmpfs /dev
+			mknod /dev/console c 5 1
+			mknod /dev/null c 1 3
+			mknod /dev/zero c 1 5
+			mknod /dev/random c 1 8
+			mknod /dev/snapshot c 10 231
+			mknod /dev/urandom c 1 9
+			mknod /dev/ptmx c 5 2
+			mknod /dev/kmsg c 1 11
+		fi
 		mkdir /dev/pts
 		mkdir /dev/shm
 	EOF


More information about the pld-cvs-commit mailing list