Author: jim
Date: 2006-08-31 13:48:31 -0600 (Thu, 31 Aug 2006)
New Revision: 2366
Added:
trunk/udev/70-device-mapper.rules
Modified:
/
trunk/udev/
trunk/udev/35-helper.rules
trunk/udev/40-modprobe.rules
trunk/udev/50-udev.rules
trunk/udev/60-persistent-disk.rules
trunk/udev/61-persistent-input.rules
trunk/udev/Makefile
Log:
[EMAIL PROTECTED] (orig r2503): jim | 2006-08-31 09:18:26 -0700
[EMAIL PROTECTED]: jim | 2006-08-31 09:17:48 -0700
Updated for Udev 098
Property changes on:
___________________________________________________________________
Name: svk:merge
- b6734a72-470d-0410-b049-f317dca95413:/:2502
+ b6734a72-470d-0410-b049-f317dca95413:/:2503
Property changes on: trunk/udev
___________________________________________________________________
Name: svk:merge
- 38c7b366-470d-0410-a457-935707c16d9b:/udev:5240
3949c430-d905-0410-97b6-f115d20341b5:/udev:1348
3b7552df-c20a-0410-b7e1-d7eaf1be8828:/udev:1263
+ 38c7b366-470d-0410-a457-935707c16d9b:/udev:5455
3949c430-d905-0410-97b6-f115d20341b5:/udev:1348
3b7552df-c20a-0410-b7e1-d7eaf1be8828:/udev:1263
Modified: trunk/udev/35-helper.rules
===================================================================
--- trunk/udev/35-helper.rules 2006-08-31 19:48:22 UTC (rev 2365)
+++ trunk/udev/35-helper.rules 2006-08-31 19:48:31 UTC (rev 2366)
@@ -36,5 +36,4 @@
BUS=="scsi", ENV{ID_CDROM_DVD_R}=="?*", PROGRAM="cdsymlink_helper.sh %n
scsi", SYMLINK+="dvdrw%c"
# adds floppy devices
-KERNEL=="fd[0-9]*", ACTION=="add", SYSFS{cmos}=="*",
RUN+="create_floppy_devices -c -t $sysfs{cmos} -m %M /dev/%k"t
-
+KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="*",
RUN+="create_floppy_devices -c -t $sysfs{cmos} -m %M /dev/%k"
Modified: trunk/udev/40-modprobe.rules
===================================================================
--- trunk/udev/40-modprobe.rules 2006-08-31 19:48:22 UTC (rev 2365)
+++ trunk/udev/40-modprobe.rules 2006-08-31 19:48:31 UTC (rev 2366)
@@ -18,10 +18,10 @@
ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
# scsi
-SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="0|7|14",
RUN+="/sbin/modprobe sd_mod"
-SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="1",
SYSFS{device/vendor}=="On[sS]tream", RUN+="/sbin/modprobe osst"
-SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="1",
RUN+="/sbin/modprobe st"
-SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="[45]",
RUN+="/sbin/modprobe sr_mod"
+SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{type}=="0|7|14",
RUN+="/sbin/modprobe sd_mod"
+SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{type}=="1",
SYSFS{device/vendor}=="On[sS]tream", RUN+="/sbin/modprobe osst"
+SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{type}=="1",
RUN+="/sbin/modprobe st"
+SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{type}=="[45]",
RUN+="/sbin/modprobe sr_mod"
SUBSYSTEM=="scsi_device", ACTION=="add", RUN+="/sbin/modprobe sg"
# floppy
Modified: trunk/udev/50-udev.rules
===================================================================
--- trunk/udev/50-udev.rules 2006-08-31 19:48:22 UTC (rev 2365)
+++ trunk/udev/50-udev.rules 2006-08-31 19:48:31 UTC (rev 2366)
@@ -34,7 +34,7 @@
KERNEL=="hvc*", GROUP="uucp"
KERNEL=="hvsi*", GROUP="uucp"
KERNEL=="iseries/vtty*", GROUP="uucp"
-KERNEL=="ttyUSB*", SYSFS{product}=="[Pp]alm*Handheld*",
SYMLINK+="pilot"
+KERNEL=="ttyUSB*", ATTRS{product}=="[Pp]alm*Handheld*",
SYMLINK+="pilot"
# video/graphics
SUBSYSTEM=="video4linux", GROUP="video"
Modified: trunk/udev/60-persistent-disk.rules
===================================================================
--- trunk/udev/60-persistent-disk.rules 2006-08-31 19:48:22 UTC (rev 2365)
+++ trunk/udev/60-persistent-disk.rules 2006-08-31 19:48:31 UTC (rev 2366)
@@ -17,22 +17,25 @@
# persistent disk links: /dev/disk/{by-id,by-uuid,by-label,by-path}
# scheme based on "Linux persistent device names", 2004, Hannes Reinecke
<[EMAIL PROTECTED]>
-ACTION!="add", GOTO="persistent_end"
-SUBSYSTEM!="block", GOTO="persistent_end"
+ACTION!="add", GOTO="persistent_storage_end"
+SUBSYSTEM!="block", GOTO="persistent_storage_end"
# skip rules for inappropriate block devices
-KERNEL=="ram*|loop*|fd*|nbd*", GOTO="persistent_end"
+KERNEL=="ram*|loop*|fd*|nbd*", GOTO="persistent_storage_end"
+# Set Permissions on CDOM
+BUS=="ide", DRIVER=="ide-cdrom", ATTRS{removable}=="1", GROUP="cdrom",
MODE="660"
+
# never access removable ide devices, the drivers are causing event loops on
open()
-BUS=="ide", DRIVER=="ide-cdrom", SYSFS{removable}=="1", GROUP="cdrom",
MODE="660"
-BUS=="ide", DRIVER!="ide-cdrom", SYSFS{removable}=="1",
GOTO="persistent_end"
+KERNEL=="hd*[!0-9]", ATTRS{removable}=="1", DRIVERS=="ide-cs|ide-floppy",
GOTO="persistent_storage_end"
+KERNEL=="hd*[0-9]", ATTRS{../removable}=="1", GOTO="persistent_storage_end"
# by-id (hardware serial number)
KERNEL=="hd*[!0-9]", IMPORT{program}="ata_id --export $tempnode"
KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*",
SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
KERNEL=="hd*[0-9]", IMPORT{parent}=="ID_*",
SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"
-KERNEL=="sd*[!0-9]|sr*", SYSFS{ieee1394_id}=="*",
ENV{ID_SERIAL}="$sysfs{ieee1394_id}", ENV{ID_BUS}="ieee1394"
+KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="*",
ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394"
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="",
IMPORT{program}="usb_id -x"
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="",
IMPORT{program}="scsi_id -g -x -s %p -d $tempnode"
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="",
IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode"
@@ -45,12 +48,12 @@
# by-path (shortest physical path)
KERNEL=="*[!0-9]|sr*", ENV{ID_TYPE}=="?*", IMPORT{program}="path_id %p",
SYMLINK+="disk/by-path/$env{ID_PATH}"
-KERNEL=="sr*", GOTO="persistent_end"
+KERNEL=="sr*", GOTO="persistent_storage_end"
KERNEL=="*[0-9]", IMPORT{parent}=="ID_*"
KERNEL=="*[0-9]", ENV{ID_PATH}=="?*",
SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"
# by-label/by-uuid (filesystem properties)
-KERNEL=="*[!0-9]", SYSFS{removable}=="1", GOTO="persistent_end"
+KERNEL=="*[!0-9]", ATTRS{removable}=="1",
GOTO="persistent_storage_end"
IMPORT{program}="vol_id --export $tempnode"
ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
@@ -62,4 +65,4 @@
KERNEL=="dm-[0-9]*", ACTION=="add", PROGRAM="/sbin/dmsetup info -c
--noopencount --noheadings -o name -j %M -m %m", SYMLINK+="disk/by-name/%c"
-LABEL="persistent_end"
+LABEL="persistent_storage_end"
Modified: trunk/udev/61-persistent-input.rules
===================================================================
--- trunk/udev/61-persistent-input.rules 2006-08-31 19:48:22 UTC (rev
2365)
+++ trunk/udev/61-persistent-input.rules 2006-08-31 19:48:31 UTC (rev
2366)
@@ -20,9 +20,18 @@
# usb devices
BUS=="usb", IMPORT{program}="usb_id -x"
-BUS=="usb", SYSFS{bInterfaceClass}=="03", SYSFS{bInterfaceProtocol}=="01",
ENV{ID_CLASS}="kbd"
-BUS=="usb", SYSFS{bInterfaceClass}=="03", SYSFS{bInterfaceProtocol}=="02",
ENV{ID_CLASS}="mouse"
+BUS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01",
ENV{ID_CLASS}="kbd"
+BUS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="02",
ENV{ID_CLASS}="mouse"
+# other devices
+DRIVERS=="pcspkr", ENV{ID_CLASS}="spkr"
+DRIVERS=="atkbd", ENV{ID_CLASS}="kbd"
+DRIVERS=="psmouse", ENV{ID_CLASS}="mouse"
+ATTRS{name}=="*dvb*|*DVB*|* IR *", ENV{ID_CLASS}="ir"
+ATTRS{modalias}=="input:*-*a[068],*|input:*-*a*,[68],*m*",
ATTRS{modalias}!="input:*-*k*14A,*r*", ENV{ID_CLASS}="joystick"
+
+ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial"
+
# by-id links
KERNEL=="mouse*", ENV{ID_BUS}=="?*", ENV{ID_SERIAL}=="?*",
ENV{ID_CLASS}=="?*",
SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}"
KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{ID_SERIAL}=="?*",
ENV{ID_CLASS}=="?*",
SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{ID_CLASS}"
Added: trunk/udev/70-device-mapper.rules
===================================================================
--- trunk/udev/70-device-mapper.rules (rev 0)
+++ trunk/udev/70-device-mapper.rules 2006-08-31 19:48:31 UTC (rev 2366)
@@ -0,0 +1,34 @@
+########################################################################
+#
+# Description : 70-device-mapper.rules
+#
+# Authors : Based on Open Suse Udev Rules
+# [EMAIL PROTECTED]
+#
+# Adapted to : Jim Gifford
+# LFS
+#
+# Version : 00.01
+#
+# Notes :
+#
+########################################################################
+
+# device mapper links hook into "online" event, when the dm table
+# is available, while some table types must be ignored
+
+KERNEL=="device-mapper", SYMLINK+="mapper/control"
+
+KERNEL=="dm-*", ACTION=="add|change", GOTO="device_mapper_do"
+GOTO="device_mapper_end"
+
+LABEL="device_mapper_do"
+PROGRAM!="/sbin/dmsetup status -j %M -m %m", GOTO="device_mapper_end"
+RESULT=="|*snapshot*|*error*", GOTO="device_mapper_end"
+
+IMPORT{program}="vol_id --export $tempnode"
+ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID}=="?*",
SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
+ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*",
SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
+
+LABEL="device_mapper_end"
+
Modified: trunk/udev/Makefile
===================================================================
--- trunk/udev/Makefile 2006-08-31 19:48:22 UTC (rev 2365)
+++ trunk/udev/Makefile 2006-08-31 19:48:31 UTC (rev 2366)
@@ -82,6 +82,7 @@
@echo "command description"
@echo
"---------------------------------------------------------------------------------------"
@echo "make install install udev rules package and
helper scripts"
+ @echo "make install-device-mapper install device-mapper rules"
@echo "make install-netboot install udev rules package for
netboot"
@echo "make install-network install network helper package"
@echo "make install-network-upgrade upgrades current network helper
package"
@@ -94,6 +95,11 @@
install -m 644 contrib/common/helper.functions
${DESTDIR}/lib/udev/helper.functions
install -m 644 contrib/common/udev_helper
${DESTDIR}/etc/sysconfig/udev_helper
+install-device-mapper:
+ install -d ${DESTDIR}/lib/udev
+ install -d ${DESTDIR}/etc/rc.d/init.d
+ install -m ${RULESMODE} 70-device-mapper.rules
${DESTDIR}/etc/udev/rules.d/70-device-mapper.rules
+
install-network: install-helper-functions install-network-update
install -d ${DESTDIR}/etc/udev/rules.d/
@echo "Adding rules to ${DESTDIR}/etc/udev/rules.d/35-helper.rules."
--
http://linuxfromscratch.org/mailman/listinfo/cross-lfs
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page