SVN: geninitrd/trunk/geninitrd

glen glen at pld-linux.org
Fri Oct 5 17:27:00 CEST 2007


Author: glen
Date: Fri Oct  5 17:26:59 2007
New Revision: 8785

Modified:
   geninitrd/trunk/geninitrd
Log:
- add dm-mirror module for dmraid setups
- generate /dev nodes from /proc/partitions also for dmraid

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd	(original)
+++ geninitrd/trunk/geninitrd	Fri Oct  5 17:26:59 2007
@@ -55,8 +55,11 @@
 # PLD loads the modules needed to mount and boot
 PROBESTATICMODULES=no
 
-# is /dev on tmpfs. internal variable
-tmpfs_dev=
+# internal variables
+# is /dev on tmpfs
+tmpfs_dev=no
+# is /proc/devices entries already created
+proc_partitions=no
 
 if [ -f /etc/udev/udev.conf -a -x /sbin/initrd-udevd ]; then
 	USE_UDEV="yes"
@@ -587,6 +590,10 @@
 		debug "LVM $LVMTOOLSVERSION enabled"
 		uselvm="yes"
 	fi
+
+	if is_yes "$USE_DMRAID"; then
+		findmodule "dm-mirror"
+	fi
 }
 
 firmware_install_module_pre() {
@@ -1151,7 +1158,6 @@
 		die "/sbin/dmraid-initrd is missing missing!"
 	fi
 
-
 	# always make /dev on tmpfs
 	initrd_gen_tmpfs_dev
 
@@ -1175,9 +1181,15 @@
 EOF
 }
 
-# generates /dev nodes based on /proc/partitions information
-# needs /proc mounted
+# Generates /dev nodes based on /proc/partitions information.
+# Needs /proc mounted.
+# Can be called multiple times.
 initrd_gen_devices() {
+	if is_yes "$proc_partitions"; then
+		return
+	fi
+	proc_partitions=yes
+
 	cat <<-'EOF' >> "$s"
 	: 'Making device nodes'
 	# ignore first two lines, header, empty line and process rest


More information about the pld-cvs-commit mailing list