Bryan Kadzban wrote:
(I will have to re-read the new udev manpages regarding the rule changes
they made in 098. IIRC from the mailing list, the changes can basically
be done with a sed on all the rules files; the replacement names for the
rule attributes have a 1-1 mapping with the old names. You just have to
replace SYSFS with ATTRS, NAME with KERNEL, etc. Or something close to
that, anyway.)
Well, here's the rather trivial patch I've come up with so far. After
applying it, can you spot anything that's obviously wrong? The only
thing that confused me was if and when we need to use the plural form of
the key names. Oh, and I left contrib/ alone. Once the rule_generator
rules go in, I guess that directory can be removed, right?
Thanks,
Matt.
diff -Naur udev-config-20060715.orig/25-lfs.rules udev-config-20060715/25-lfs.rules
--- udev-config-20060715.orig/25-lfs.rules 2006-07-14 22:29:28.000000000 +0100
+++ udev-config-20060715/25-lfs.rules 2006-09-18 23:14:56.000000000 +0100
@@ -89,7 +89,7 @@
KERNEL=="auer*", NAME="usb/%k"
KERNEL=="legousbtower*", NAME="usb/%k"
KERNEL=="dabusb*", NAME="usb/%k"
-BUS=="usb", KERNEL=="lp[0-9]*", GROUP="lp", NAME="usb/%k"
+SUBSYSTEM=="usb", KERNEL=="lp[0-9]*", GROUP="lp", NAME="usb/%k"
# DRI devices are managed by the X server, so prevent udev from creating them
diff -Naur udev-config-20060715.orig/26-modprobe.rules udev-config-20060715/26-modprobe.rules
--- udev-config-20060715.orig/26-modprobe.rules 2006-07-12 14:25:33.000000000 +0100
+++ udev-config-20060715/26-modprobe.rules 2006-09-18 23:22:34.000000000 +0100
@@ -4,7 +4,7 @@
ACTION=="add", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
-# SCSI devices require different modules, dependent on their SYSFS{type}. All
+# SCSI devices require different modules, dependent on their ATTR{type}. All
# of them require 'sg' though.
#
# module name sysfs types
@@ -12,7 +12,7 @@
# st/osst 1 (TYPE_TAPE)
# sr 4 (TYPE_WORM), 5 (TYPE_ROM)
-SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
-SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{type}=="1", RUN+="/sbin/modprobe st"
-SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{type}=="[45]", RUN+="/sbin/modprobe sr_mod"
+SUBSYSTEM=="scsi_device", ACTION=="add", ATTR{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
+SUBSYSTEM=="scsi_device", ACTION=="add", ATTR{type}=="1", RUN+="/sbin/modprobe st"
+SUBSYSTEM=="scsi_device", ACTION=="add", ATTR{type}=="[45]", RUN+="/sbin/modprobe sr_mod"
SUBSYSTEM=="scsi_device", ACTION=="add", RUN+="/sbin/modprobe sg"
diff -Naur udev-config-20060715.orig/60-persistent-storage.rules udev-config-20060715/60-persistent-storage.rules
--- udev-config-20060715.orig/60-persistent-storage.rules 2006-05-13 00:03:13.000000000 +0100
+++ udev-config-20060715/60-persistent-storage.rules 2006-09-18 23:23:39.000000000 +0100
@@ -8,8 +8,8 @@
KERNEL=="ram*|loop*|fd*|nbd*", GOTO="persistent_storage_end"
# never access removable ide devices, the drivers are causing event loops on open()
-KERNEL=="hd*[!0-9]", SYSFS{removable}=="1", DRIVER=="ide-cs|ide-floppy", GOTO="persistent_storage_end"
-KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_storage_end"
+KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVER=="ide-cs|ide-floppy", GOTO="persistent_storage_end"
+KERNEL=="hd*[0-9]", ATTR{../removable}=="1", GOTO="persistent_storage_end"
# for partitions import parent information
KERNEL=="*[0-9]", IMPORT{parent}=="ID_*"
@@ -19,7 +19,7 @@
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*|st*", SYSFS{ieee1394_id}=="*", ENV{ID_SERIAL}="$sysfs{ieee1394_id}", ENV{ID_BUS}="ieee1394"
+KERNEL=="sd*[!0-9]|sr*|st*", ATTR{ieee1394_id}=="*", ENV{ID_SERIAL}="$sysfs{ieee1394_id}", ENV{ID_BUS}="ieee1394"
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="usb_id -x"
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -s %p -d $tempnode"
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode"
@@ -35,7 +35,7 @@
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_storage_end"
+KERNEL=="*[!0-9]", ATTRS{removable}=="1", GOTO="persistent_storage_end"
IMPORT{program}="vol_id --export $tempnode"
ENV{ID_FS_USAGE}=="filesystem|other", 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}"
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page