]> err.no Git - systemd/commitdiff
update Debian rules
authorMarco d'Itri <md@Linux.IT>
Wed, 21 Mar 2007 19:05:08 +0000 (20:05 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Wed, 21 Mar 2007 19:05:08 +0000 (20:05 +0100)
etc/udev/debian/devfs.rules
etc/udev/debian/hotplug.rules
etc/udev/debian/permissions.rules
etc/udev/debian/persistent.rules
etc/udev/debian/udev.rules

index 37e4ae1bc9ffed2bf15f1d2e8649ebe6cf394531..2e0caa1d6938832bc37fd6eefd8896aa5a5288fa 100644 (file)
@@ -20,14 +20,15 @@ SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTRS{media}=="floppy", \
 
 # IDE devices
 SUBSYSTEMS=="ide", KERNEL=="hd[a-z]*", PROGRAM="ide-devfs.sh %k %b %n", \
+                                       ACTION=="add", \
                                        NAME="%c{1}", SYMLINK+="%k %c{2}"
 
 # SCSI devices
-SUBSYSTEMS=="scsi", PROGRAM="scsi-devfs.sh %k %b %n", \
+SUBSYSTEMS=="scsi", PROGRAM="scsi-devfs.sh %k %b %n", ACTION=="add", \
                                        NAME="%c{1}", SYMLINK+="%k %c{2}"
 
 # RAID controllers
-KERNEL=="cciss!*|ida!*|rd!*", PROGRAM="raid-devfs.sh %k", \
+KERNEL=="cciss!*|ida!*|rd!*", PROGRAM="raid-devfs.sh %k", ACTION=="add", \
                                        NAME="%c{1}", SYMLINK+="%k"
 
 # other block devices
@@ -47,7 +48,7 @@ SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \
                                                SYMLINK+="pilot"
 
 # usbfs-like devices
-SUBSYSTEM=="usb_device",       PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \
+SUBSYSTEM=="usb_device",       PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \
                                NAME="%c"
 
 # serial devices
@@ -69,7 +70,7 @@ KERNEL=="video[0-9]*",                NAME="v4l/%k"
 KERNEL=="radio[0-9]*",         NAME="v4l/%k"
 KERNEL=="vbi[0-9]*",           NAME="v4l/%k"
 KERNEL=="vtx[0-9]*",           NAME="v4l/%k"
-KERNEL=="dvb*",                        PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", \
+KERNEL=="dvb*",                        PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", ACTION=="add", \
                                NAME="%c"
 KERNEL=="fb[0-9]*",            NAME="fb/%n"
 KERNEL=="card[0-9]*",          NAME="dri/%k"
@@ -147,6 +148,5 @@ SUBSYSTEM=="aoe", KERNEL=="interfaces",     NAME="etherd/%k"
 SUBSYSTEM=="aoe", KERNEL=="revalidate",        NAME="etherd/%k"
 
 # device mapper creates its own device nodes, so ignore these
-KERNEL=="dm-[0-9]*",           NAME=""
 KERNEL=="device-mapper",       NAME="mapper/control"
 
index 8b48d77f569d7e05519e29170f3a8e9654938459..0b2fc57126efb730064d62c54a2e05425780a06d 100644 (file)
@@ -3,17 +3,20 @@ ACTION!="add", GOTO="hotplug_not_add_event"
 # check if the device has already been claimed by a driver
 ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="hotplug_driver_loaded"
 
+# this driver is broken and should not be loaded automatically (see #398962)
+SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="hotplug_driver_loaded"
+
 # load the drivers
-ENV{MODALIAS}=="?*",   RUN+="/sbin/modprobe $env{MODALIAS}"
+ENV{MODALIAS}=="?*",   RUN+="/sbin/modprobe --use-blacklist $env{MODALIAS}"
 SUBSYSTEM=="ide",      ENV{MODALIAS}!="?*",    RUN+="ide.agent"
 
-SUBSYSTEM=="pnp",      ENV{MODALIAS}!="?*",    RUN+="/bin/sh -c 'while read id; do /sbin/modprobe pnp:d$$id; done < /sys$devpath/id'"
+SUBSYSTEM=="pnp",      ENV{MODALIAS}!="?*",    RUN+="/bin/sh -c 'while read id; do /sbin/modprobe --use-blacklist pnp:d$$id; done < /sys$devpath/id'"
 
 SUBSYSTEM=="pcmcia_socket",                    RUN+="/sbin/modprobe pcmcia"
 
 # rules for subsystems which lack proper hotplug support
-SUBSYSTEM=="i2o",                              RUN+="/sbin/modprobe i2o-block"
-#SUBSYSTEM=="mmc",                             RUN+="/sbin/modprobe mmc-block"
+SUBSYSTEM=="i2o",                              RUN+="/sbin/modprobe i2o_block"
+SUBSYSTEM=="mmc",                              RUN+="/sbin/modprobe mmc_block"
 
 SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
 SUBSYSTEM=="scsi_device", ATTRS{type}=="1",    RUN+="/sbin/modprobe osst", \
@@ -23,6 +26,7 @@ SUBSYSTEM=="scsi_device", ATTRS{type}=="1",   RUN+="/sbin/modprobe st", \
 SUBSYSTEM=="scsi_device", ATTRS{type}=="1",    RUN+="/sbin/modprobe st", \
        ATTRS{vendor}!="Onstream"
 SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", RUN+="/sbin/modprobe sr_mod"
+SUBSYSTEM=="scsi_device", ATTRS{type}=="8",    RUN+="/sbin/modprobe ch"
 SUBSYSTEM=="scsi_device", ATTRS{type}=="[235689]", RUN+="/sbin/modprobe sg"
 
 SUBSYSTEM=="ide", ATTR{media}=="tape",         RUN+="/sbin/modprobe ide-scsi"
index 06bbf662600f72639620903727076679bf990bbe..ac6c0be38be8dd0a9c4694b043c2f45b61d5ae87 100644 (file)
@@ -11,7 +11,11 @@ SUBSYSTEM=="net", ENV{DRIVER}=="?*",         WAIT_FOR_SYSFS="device/driver"
 
 # default permissions for block devices
 SUBSYSTEM=="block",                            GROUP="disk"
-SUBSYSTEM=="block", ATTR{removable}=="1",      GROUP="floppy"
+# the aacraid driver is broken and reports that disks removable (see #404927)
+SUBSYSTEM=="block", ATTRS{removable}=="1", \
+       DRIVERS!="aacraid",                     GROUP="floppy"
+# all block devices on these buses are "removable"
+SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394|mmc|pcmcia", GROUP="floppy"
 
 # IDE devices
 KERNEL=="hd[a-z]|pcd[0-9]*",                   DRIVERS=="ide-cdrom|pcd", \
@@ -25,8 +29,10 @@ KERNEL=="sr[0-9]*", IMPORT{program}="cdrom_id --export $tempnode"
 SUBSYSTEMS=="scsi", ATTRS{type}=="1",                          GROUP="tape"
 SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="HP",     GROUP="scanner"
 SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="Epson",  GROUP="scanner"
+SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="EPSON",  GROUP="scanner"
 SUBSYSTEMS=="scsi", ATTRS{type}=="5",                          GROUP="cdrom"
 SUBSYSTEMS=="scsi", ATTRS{type}=="6",                          GROUP="scanner"
+SUBSYSTEMS=="scsi", ATTRS{type}=="8",                          GROUP="tape"
 
 # USB devices
 KERNEL=="legousbtower*",       MODE="0666"
@@ -74,10 +80,12 @@ KERNEL=="sgi_fetchop",              MODE="0666"
 KERNEL=="sonypi",              MODE="0666"
 KERNEL=="agpgart",                             GROUP="video"
 KERNEL=="nvram",                               GROUP="nvram"
-KERNEL=="rtc",                                 GROUP="audio"
+KERNEL=="rtc|rtc[0-9]*",                       GROUP="audio"
 KERNEL=="tpm*",                        MODE="0600",    OWNER="tss", GROUP="tss"
 KERNEL=="fuse",                                        GROUP="fuse"
 KERNEL=="kqemu",               MODE="0666"
+KERNEL=="kvm",                                 GROUP="kvm"
+KERNEL=="tun",                 MODE="0666"
 
 KERNEL=="cdemu[0-9]*",                         GROUP="cdrom"
 KERNEL=="pktcdvd[0-9]*",                       GROUP="cdrom"
@@ -105,6 +113,7 @@ KERNEL=="video1394*",                               GROUP="video"
 KERNEL=="event[0-9]*", ATTRS{name}=="*dvb*|*DVB*|* IR *" \
                                MODE="0664",    GROUP="video"
 KERNEL=="js[0-9]*",            MODE="0664"
+KERNEL=="lirc[0-9]*",                          GROUP="video"
 
 # AOE character devices
 SUBSYSTEM=="aoe",              MODE="0220",    GROUP="disk"
index 277d03dea80d66b761054d3a4cc12234b50345ab..c82a639556724366d919764aaaf4fbf5da9ec4e2 100644 (file)
@@ -5,12 +5,12 @@ SUBSYSTEM!="block",                   GOTO="no_volume_id"
 ACTION!="add",                         GOTO="no_volume_id"
 
 # and we can safely ignore these kinds of devices
-KERNEL=="ram*|loop*|fd*|nbd*|dm-*",    GOTO="no_volume_id"
+KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="no_volume_id"
 
 # skip removable ide devices, because open(2) on them causes an events loop
 KERNEL=="hd*[!0-9]",   ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", \
        GOTO="no_volume_id"
-KERNEL=="hd*[0-9]", ATTR{../removable}=="1", \
+KERNEL=="hd*[0-9]", ATTRS{removable}=="1", \
        GOTO="no_volume_id"
 
 # skip xen virtual hard disks
@@ -20,13 +20,17 @@ DRIVERS=="vbd",                             GOTO="no_hardware_id"
 KERNEL=="hd*[!0-9]", \
        IMPORT{program}="ata_id --export $tempnode"
 
-KERNEL=="sd*[!0-9]|sr*|st*",           ATTRS{ieee1394_id}=="?*", \
+KERNEL=="sd*[!0-9]|sr*|st*|nst*",      ATTRS{ieee1394_id}=="?*", \
        ENV{ID_BUS}="ieee1394", ENV{ID_SERIAL}="$attr{ieee1394_id}"
-KERNEL=="sd*[!0-9]|sr*|st*",           ENV{ID_SERIAL}=="", \
+KERNEL=="sd*[!0-9]|sr*|st*|nst*",      ENV{ID_SERIAL}=="", \
        IMPORT{program}="usb_id -x"
-KERNEL=="sd*[!0-9]|sr*|st*",           ENV{ID_SERIAL}=="", \
+KERNEL=="sd*[!0-9]|sr*|st*|nst*",      ENV{ID_SERIAL}=="", \
        IMPORT{program}="scsi_id -g -x -s $devpath -d $tempnode"
-KERNEL=="sd*[!0-9]|sr*|st*",           ENV{ID_SERIAL}=="", \
+KERNEL=="sd*[!0-9]|sr*|st*|nst*",      ENV{ID_SERIAL}=="", \
+       IMPORT{program}="scsi_id -g -x -a -s $devpath -d $tempnode"
+KERNEL=="sg*", ATTRS{type}=="8",       ENV{ID_SERIAL}=="", \
+       IMPORT{program}="scsi_id -g -x -s $devpath -d $tempnode"
+KERNEL=="sg*", ATTRS{type}=="8",       ENV{ID_SERIAL}=="", \
        IMPORT{program}="scsi_id -g -x -a -s $devpath -d $tempnode"
 
 KERNEL=="dasd*[!0-9]", \
@@ -47,16 +51,35 @@ KERNEL=="hd*[!0-9]",                        ENV{ID_SERIAL}=="?*", \
        SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
 KERNEL=="hd*[0-9]",                    ENV{ID_SERIAL}=="?*", \
        SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"
+KERNEL=="sd*[!0-9]|sr*",               ENV{ID_SERIAL_SHORT}=="?*", \
+       ENV{ID_VENDOR}=="ATA", \
+       SYMLINK+="disk/by-id/ata-$env{ID_MODEL}-$env{ID_SERIAL_SHORT}"
+KERNEL=="sd*[0-9]",                    ENV{ID_SERIAL_SHORT}=="?*", \
+       ENV{ID_VENDOR}=="ATA", \
+       SYMLINK+="disk/by-id/ata-$env{ID_MODEL}-$env{ID_SERIAL_SHORT}-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"
+
+KERNEL=="*[!0-9]",                     ENV{ID_EDD}=="?*", \
+       SYMLINK+="disk/by-id/edd-$env{ID_EDD}"
+KERNEL=="*[0-9]",                      ENV{ID_EDD}=="?*", \
+       SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n"
+
 KERNEL=="sd*[!0-9]|dasd[!0-9]*|sr*",   ENV{ID_SERIAL}=="?*", \
        SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
 KERNEL=="sd*[0-9]|dasd*[0-9]",         ENV{ID_SERIAL}=="?*", \
        SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
 KERNEL=="st*",                         ENV{ID_SERIAL}=="?*", \
        SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
-KERNEL=="*[!0-9]",                     ENV{ID_EDD}=="?*", \
-       SYMLINK+="disk/by-id/edd-$env{ID_EDD}"
-KERNEL=="*[0-9]",                      ENV{ID_EDD}=="?*", \
-       SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n"
+KERNEL=="nst*",                                ENV{ID_SERIAL}=="?*", \
+       SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst"
+KERNEL=="sg*", ATTRS{type}=="8",       ENV{ID_SERIAL}=="?*", \
+       SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
 
 KERNEL=="*[!0-9]|sr*",                 ENV{ID_PATH}=="?*", \
        SYMLINK+="disk/by-path/$env{ID_PATH}"
index 3da6fadf8f2b207ab086a1abfd543e950fd41769..3f7b704f783e70149e46e1fa2abe2024f34a40c3 100644 (file)
@@ -33,7 +33,7 @@ SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \
                                        SYMLINK+="pilot"
 
 # usbfs-like devices
-SUBSYSTEM=="usb_device",       PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \
+SUBSYSTEM=="usb_device",       PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \
                                NAME="%c"
 
 # serial devices
@@ -41,7 +41,7 @@ KERNEL=="capi",                       NAME="capi20", SYMLINK+="isdn/capi20"
 KERNEL=="capi[0-9]*",          NAME="capi/%n"
 
 # video devices
-KERNEL=="dvb*",                        PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", \
+KERNEL=="dvb*",                        PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", ACTION=="add", \
                                NAME="%c"
 KERNEL=="card[0-9]*",          NAME="dri/%k"
 
@@ -97,6 +97,5 @@ SUBSYSTEM=="aoe", KERNEL=="interfaces",       NAME="etherd/%k"
 SUBSYSTEM=="aoe", KERNEL=="revalidate",        NAME="etherd/%k"
 
 # device mapper creates its own device nodes, so ignore these
-KERNEL=="dm-[0-9]*",           NAME=""
 KERNEL=="device-mapper",       NAME="mapper/control"