SVN: geninitrd/trunk/geninitrd
glen
glen at pld-linux.org
Fri Oct 5 15:37:33 CEST 2007
Author: glen
Date: Fri Oct 5 15:37:32 2007
New Revision: 8783
Modified:
geninitrd/trunk/geninitrd
Log:
- create /dev entries also for dmraid
- made initrd_gen_devices() as function
Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd (original)
+++ geninitrd/trunk/geninitrd Fri Oct 5 15:37:32 2007
@@ -1161,6 +1161,11 @@
cat <<-EOF >> "$s"
mount -t proc none /proc
mount -t sysfs none /sys
+EOF
+
+ initrd_gen_devices
+
+ cat <<-EOF >> "$s"
# 2 secs was enough for my system to initialize. but really this is udev issue?
usleep 2000000
: 'Activating Device-Mapper RAID(s)'
@@ -1170,6 +1175,21 @@
EOF
}
+# generates /dev nodes based on /proc/partitions information
+# needs /proc mounted
+initrd_gen_devices() {
+ cat <<-EOF >> "$s"
+ : 'Making device nodes'
+ # ignore first two lines, header, empty line and process rest
+ cat /proc/partitions | (read b; read b; while read major minor blocks dev rest; do
+ node=/dev/\$dev
+ mkdir -p \${node%/*}
+ mknod \$node b \$major \$minor
+ done
+ )
+EOF
+}
+
initrd_gen_softraid() {
debug "Setting up mdadm..."
@@ -1311,15 +1331,9 @@
lvm dumpconfig | awk '/filter=/' >> "$MNTIMAGE/etc/lvm.conf"
echo "}" >> "$MNTIMAGE/etc/lvm.conf"
+ initrd_gen_devices
+
cat <<-EOF >> "$s"
- : 'Making device nodes'
- # ignore first two lines, header, empty line and process rest
- cat /proc/partitions | (read b; read b; while read major minor blocks dev rest; do
- node=/dev/\$dev
- mkdir -p \${node%/*}
- mknod \$node b \$major \$minor
- done
- )
# disable noise from lvm accessing devices that aren't ready.
printk=\$(cat /proc/sys/kernel/printk)
More information about the pld-cvs-commit
mailing list