SVN: geninitrd/trunk/mod-udev.sh

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


Author: wiget
Date: Sat Dec  3 20:52:31 2011
New Revision: 12427

Modified:
   geninitrd/trunk/mod-udev.sh
Log:
Install udev rules and helpers

Modified: geninitrd/trunk/mod-udev.sh
==============================================================================
--- geninitrd/trunk/mod-udev.sh	(original)
+++ geninitrd/trunk/mod-udev.sh	Sat Dec  3 20:52:31 2011
@@ -9,6 +9,20 @@
 # - make udev start before insmods
 # - make proper use of USE_UDEV - don't copy rules if USE_UDEV is off no!
 
+inst_rules() {
+	local _rule _found d
+
+	inst_d "/lib/udev/rules.d"
+	for _rule in "$@"; do
+		for d in /lib/udev/rules.d /etc/udev/rules.d /lib/geninitrd/udev/rules.d; do
+			if [ -f $d/$_rule ]; then
+				inst $d/$_rule /lib/udev/rules.d/$_rule
+			fi
+		done
+	done
+
+}
+
 # setup geninitrd module
 # @access	public
 setup_mod_udev() {
@@ -33,6 +47,15 @@
 	inst_exec $udevd /sbin/udevd
 	inst_exec $udevadm /sbin/udevadm
 	inst /etc/udev/udev.conf /etc/udev/udev.conf
+	# standard udev rules
+	inst_rules 50-udev-default.rules 60-persistent-storage.rules 61-persistent-storage-edd.rules 80-drivers.rules 95-udev-late.rules \
+		60-pcmcia.rules 50-firmware.rules 10-dm.rules 11-dm-lvm.rules 13-dm-disk.rules
+
+	for e in ata_id cdrom_id collect firmware scsi_id v4l_id; do
+		inst_exec $initrd_dir/udev/$e /lib/udev/$e
+	done
+	inst_exec $initrd_dir/blkid /sbin/blkid
+	inst_exec $initrd_dir/dmsetup /sbin/dmsetup
 
 	mount_dev
 	mount_sys


More information about the pld-cvs-commit mailing list