From 0809c264e9878cdd1c61d9fb0e077972bc596ef8 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Fri, 6 Apr 2007 19:53:20 +0200 Subject: [PATCH] default rules: add libata compat links --- etc/udev/rules.d/60-persistent-input.rules | 3 ++- etc/udev/rules.d/60-persistent-storage.rules | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/etc/udev/rules.d/60-persistent-input.rules b/etc/udev/rules.d/60-persistent-input.rules index 4bc034ce..623eb7d2 100644 --- a/etc/udev/rules.d/60-persistent-input.rules +++ b/etc/udev/rules.d/60-persistent-input.rules @@ -14,7 +14,8 @@ 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" +# fill empty serial number +ENV{ID_CLASS}=="?*", ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial" # by-id links KERNEL=="mouse*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}" diff --git a/etc/udev/rules.d/60-persistent-storage.rules b/etc/udev/rules.d/60-persistent-storage.rules index a7efb327..b7af0bcb 100644 --- a/etc/udev/rules.d/60-persistent-storage.rules +++ b/etc/udev/rules.d/60-persistent-storage.rules @@ -36,6 +36,11 @@ KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" KERNEL=="sd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" +# libata compat (links like hd*) +KERNEL=="sd*[!0-9]|sr*", ENV{ID_VENDOR}=="ATA", PROGRAM="ata_id $tempnode", ENV{ID_ATA_COMPAT}="$result" +KERNEL=="sd*[!0-9]|sr*", ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}" +KERNEL=="sd*[0-9]", ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}-part%n" + KERNEL=="mmcblk[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}" KERNEL=="mmcblk[0-9]p[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n" -- 2.39.5