SVN: geninitrd/trunk/geninitrd

glen glen at pld-linux.org
Wed Oct 18 00:46:48 CEST 2006


Author: glen
Date: Wed Oct 18 00:46:48 2006
New Revision: 7864

Modified:
   geninitrd/trunk/geninitrd
Log:
$UDEV_TMPFS dropped, $tmpfs_dev indicates that /dev is with tmpfs.

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd	(original)
+++ geninitrd/trunk/geninitrd	Wed Oct 18 00:46:48 2006
@@ -42,9 +42,11 @@
 # default bootsplash is off, if it have to be on, install bootsplash package
 BOOT_SPLASH=no
 
+# is /dev on tmpfs. internal variable
+tmpfs_dev=
+
 if [ -f /etc/udev/udev.conf -a -x /sbin/initrd-udev ]; then
 	USE_UDEV="yes"
-	UDEV_TMPFS="yes"
 	. /etc/udev/udev.conf
 fi
 
@@ -909,7 +911,6 @@
 	USE_UDEV=
 	USE_DMRAID=
 fi
-[ -z "$USE_UDEV" ] && UDEV_TMPFS=
 
 if [ "$pack_version" -ge "002005" ] ; then
 	modext=".ko"
@@ -1140,6 +1141,19 @@
 EOF
 }
 
+initrd_gen_tmpfs_dev() {
+	tmpfs_dev=yes
+	cat <<-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
+mkdir /dev/pts
+mkdir /dev/shm
+EOF
+}
+
 initrd_gen_udev() {
 	[ -n "$verbose" ] && echo "Setting up udev..."
 	mkdir -p $MNTIMAGE/sbin
@@ -1154,17 +1168,7 @@
 	ln -s udev $MNTIMAGE/sbin/hotplug
 
 	if is_yes "$USE_UDEV"; then
-		if is_yes "$UDEV_TMPFS"; then
-			cat >> "$s" <<-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
-mkdir /dev/pts
-mkdir /dev/shm
-EOF
-		fi
+		initrd_gen_tmpfs_dev >> "$s"
 		cat >> "$s" <<-EOF
 mount -t proc none /proc
 mount -t sys none /sys
@@ -1317,7 +1321,7 @@
 	mkdir -p $MNTIMAGE/tmp
 	mkdir -p $MNTIMAGE/proc
 	mkdir -p $MNTIMAGE/newroot
-	if ! is_yes "$USE_UDEV"; then
+	if ! is_yes "$tmpfs_dev"; then
 		mkdir -p $MNTIMAGE/dev/mapper
 		mknod $MNTIMAGE/dev/mapper/control c 10 63
 		for device in $PVDEVICES; do


More information about the pld-cvs-commit mailing list