Changeset 95756c0


Ignore:
Timestamp:
May 24, 2007, 10:28:56 AM (18 years ago)
Author:
Jim Gifford <clfs@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
850f2ea6
Parents:
2b92d03
Message:

Updates with Upstream

Location:
udev
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • udev/50-udev.rules

    r2b92d03 r95756c0  
    1919
    2020# console
    21 KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]",     GROUP="tty", MODE="666", OPTIONS="last_rule"
    22 KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]",     GROUP="tty", MODE="666", OPTIONS="last_rule"
    23 KERNEL=="vcs*",                                         GROUP="tty", MODE="620", OPTIONS="last_rule"
    24 KERNEL=="tty",                                          GROUP="tty", MODE="666", OPTIONS="last_rule"
    25 KERNEL=="tty[0-9]*",                                    GROUP="tty", MODE="620", OPTIONS="last_rule"
    26 KERNEL=="console",                                      MODE="600", OPTIONS="last_rule"
    27 KERNEL=="ptmx",                                         GROUP="tty", MODE="666", OPTIONS="last_rule"
     21KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]",     GROUP="tty", MODE="0666", OPTIONS="last_rule"
     22KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]",     GROUP="tty", MODE="0666", OPTIONS="last_rule"
     23KERNEL=="tty",                                          GROUP="tty", MODE="0666", OPTIONS="last_rule"
     24KERNEL=="tty[0-9]*|vcs*",                               GROUP="tty", MODE="0620", OPTIONS="last_rule"
     25KERNEL=="ptmx",                                         GROUP="tty", MODE="0666", OPTIONS="last_rule"
     26KERNEL=="console",                                      MODE="0600", OPTIONS="last_rule"
    2827
    2928# serial devices
     
    5150
    5251# input devices
    53 KERNEL=="mouse*|mice",          NAME="input/%k", MODE="0640"
    54 KERNEL=="event*",               NAME="input/%k", MODE="0640"
     52KERNEL=="mouse*|mice|event*",   NAME="input/%k", MODE="0640"
    5553KERNEL=="js*",                  NAME="input/%k", MODE="0644"
    56 KERNEL=="ts*",                  NAME="input/%k", MODE="0600"
    57 KERNEL=="uinput",               NAME="input/%k", MODE="0600"
     54KERNEL=="ts*|uinput",           NAME="input/%k", MODE="0600"
    5855KERNEL=="lirc0",                SYMLINK+="lirc"
    5956
     
    8986
    9087# misc devices
    91 KERNEL=="mem|kmem",             GROUP="kmem", MODE="640"
    92 KERNEL=="port",                 GROUP="kmem", MODE="640"
    93 KERNEL=="nvram",                GROUP="kmem", MODE="600"
    94 KERNEL=="null",                 MODE="666"
    95 KERNEL=="zero",                 MODE="666"
    96 KERNEL=="full",                 MODE="622"
    97 KERNEL=="random",               MODE="666"
    98 KERNEL=="urandom",              MODE="644"
    99 KERNEL=="rtc",                  GROUP="audio"
    100 KERNEL=="sonypi",               MODE="666"
    101 KERNEL=="agpgart",              MODE="600", GROUP="video"
    102 KERNEL=="djs*",                 MODE="644"
    103 KERNEL=="sgi_*",                MODE="666"
    104 KERNEL=="rrom*",                MODE="400"
    105 KERNEL=="rflash*",              MODE="400"
    106 KERNEL=="usbscanner*",          MODE="644"
    107 KERNEL=="3270/ttycons*",        MODE="600"
    108 KERNEL=="3270/tub*",            MODE="666"
    109 KERNEL=="3270/tubcons*",        MODE="600"
    110 KERNEL=="ica",                  MODE="666"
    111 KERNEL=="z90crypt",             MODE="666"
    112 KERNEL=="mmtimer",              MODE="444"
    113 KERNEL=="auer[0-9]*"            NAME="usb/%k"
     88KERNEL=="mem|kmem|port",        GROUP="kmem", MODE="0640"
     89KERNEL=="nvram",                GROUP="kmem", MODE="0600"
     90KERNEL=="null|zero|random",     MODE="0666"
     91KERNEL=="full",                 MODE="0622"
     92KERNEL=="urandom",              MODE="0644"
     93KERNEL=="rtc",                  MODE="0600"
     94KERNEL=="fuse",                 MODE="0666"
     95KERNEL=="sonypi",               MODE="0666"
     96KERNEL=="agpgart",              MODE="0600", GROUP="video"
     97KERNEL=="djs*",                 MODE="0644"
     98KERNEL=="sgi_*",                MODE="0666"
     99KERNEL=="rrom*",                MODE="0400"
     100KERNEL=="rflash*",              MODE="0400"
     101KERNEL=="usbscanner*",          MODE="0644"
     102KERNEL=="3270/ttycons*",        MODE="0600"
     103KERNEL=="3270/tub*",            MODE="0666"
     104KERNEL=="3270/tubcons*",        MODE="0600"
     105KERNEL=="ica",                  MODE="0666"
     106KERNEL=="z90crypt",             MODE="0666"
     107KERNEL=="mmtimer",              MODE="0644"
     108KERNEL=="auer[0-9]*",           NAME="usb/%k"
    114109
    115110# packet writing interface
     
    128123
    129124# misc storage devices (non-block)
    130 KERNEL=="sg*",                  GROUP="disk", MODE="640"
    131 KERNEL=="sr*",                  GROUP="cdrom", MODE="660"
     125KERNEL=="sg*",                  GROUP="disk", MODE="0640"
     126KERNEL=="sr*",                  GROUP="cdrom", MODE="0660"
    132127KERNEL=="st*",                  GROUP="tape"
    133128KERNEL=="nst*",                 GROUP="tape"
     
    153148
    154149# libusb device access
    155 SUBSYSTEM=="usb_device",        PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0660", GROUP="usb"
     150SUBSYSTEM=="usb",               ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"
     151SUBSYSTEM=="usb_device",        ACTION=="add", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644"
  • udev/60-persistent-disk.rules

    r2b92d03 r95756c0  
    1515########################################################################
    1616
    17 # persistent disk links: /dev/disk/{by-id,by-uuid,by-label,by-path}
     17# persistent storage links: /dev/{disk,tape}/{by-id,by-uuid,by-label,by-path,by-name}
    1818# scheme based on "Linux persistent device names", 2004, Hannes Reinecke <hare@suse.de>
    1919
    20 ACTION!="add",          GOTO="persistent_storage_end"
     20ACTION!="add", GOTO="persistent_storage_end"
    2121
    2222KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -s %p -d $tempnode"
     
    2929KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
    3030
    31 SUBSYSTEM!="block",     GOTO="persistent_storage_end"
     31SUBSYSTEM!="block", GOTO="persistent_storage_end"
    3232
    3333# skip rules for inappropriate block devices
    3434KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="persistent_storage_end"
    3535
    36 # Set Permissions on CDOM
    37 BUS=="ide",     DRIVERS=="ide-cdrom", ATTRS{removable}=="1", GROUP="cdrom", MODE="660"
     36# never access non-cdrom removable ide devices, the drivers are causing event loops on open()
     37KERNEL=="hd*[!0-9]",    ATTRS{removable}=="1", DRIVERS=="ide-cs|ide-floppy", GOTO="persistent_storage_end"
     38KERNEL=="hd*[0-9]",     ATTRS{removable}=="1", GOTO="persistent_storage_end"
    3839
    39 # never access removable ide devices, the drivers are causing event loops on open()
    40 KERNEL=="hd*[!0-9]",    ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", GOTO="persistent_storage_end"
    41 KERNEL=="hd*[0-9]",     ATTRS{removable}=="1", GOTO="persistent_storage_end"
     40# ignore partitions that span the entire disk
     41ATTR{whole_disk}=="", GOTO="persistent_storage_end"
    4242
    4343# for partitions import parent information
    44 KERNEL=="*[0-9]", IMPORT{parent}=="ID_*"
     44KERNEL=="*[0-9]", IMPORT{parent}="ID_*"
    4545
    4646# by-id (hardware serial number)
    47 KERNEL=="hd*[!0-9]",    IMPORT{program}="ata_id --export $tempnode"
    48 KERNEL=="hd*[!0-9]",    ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
    49 KERNEL=="hd*[0-9]",     SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"
     47KERNEL=="hd*[!0-9]",    IMPORT{program}="ata_id --export $tempnode"
     48KERNEL=="hd*[!0-9]",    ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
     49KERNEL=="hd*[0-9]",     SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"
    5050
    5151KERNEL=="sd*[!0-9]|sr*|st*",    ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394"
    5252KERNEL=="sd*[!0-9]|sr*|st*",    ENV{ID_SERIAL}=="", IMPORT{program}="usb_id -x"
    5353KERNEL=="sd*[!0-9]|sr*|st*",    ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -s %p -d $tempnode"
    54 KERNEL=="sd*[!0-9]|sr*|st*",    ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode"
     54KERNEL=="sd*[!0-9]|sr*|st*",    ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode"
    5555KERNEL=="sd*[!0-9]|sr*",        ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
     56KERNEL=="sd*[0-9]",             ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
    5657
    5758# libata compat (links like hd*)
    58 KERNEL=="sd*[!0-9]|sr*",        ENV{ID_VENDOR}=="ATA", PROGRAM="ata_id $tempnode", ENV{ID_ATA_COMPAT}="$result"
    59 KERNEL=="sd*[!0-9]|sr*",        ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}"
    60 KERNEL=="sd*[0-9]",             ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}-part%n"
     59KERNEL=="sd*[!0-9]|sr*",        ENV{ID_VENDOR}=="ATA", PROGRAM="ata_id $tempnode", ENV{ID_ATA_COMPAT}="$result"
     60KERNEL=="sd*[!0-9]|sr*",        ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}"
     61KERNEL=="sd*[0-9]",             ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}-part%n"
    6162
    62 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}"
    63 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"
     63KERNEL=="mmcblk[0-9]",          ATTRS{name}=="?*", ATTRS{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}"
     64KERNEL=="mmcblk[0-9]p[0-9]",    ATTRS{name}=="?*", ATTRS{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n"
    6465
    6566# by-path (shortest physical path)
     
    7071
    7172# by-label/by-uuid (filesystem properties)
    72 KERNEL=="*[!0-9]",                              ATTR{removable}=="1", GOTO="persistent_storage_end"
     73KERNEL=="*[!0-9]",                              ATTRS{removable}=="1", GOTO="persistent_storage_end"
    7374IMPORT{program}="vol_id --export $tempnode"
    74 ENV{ID_FS_USAGE}=="filesystem|other|crypto",    ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
    75 ENV{ID_FS_USAGE}=="filesystem|other",           ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
     75ENV{ID_FS_USAGE}=="filesystem|other|crypto",    ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
     76ENV{ID_FS_USAGE}=="filesystem|other",           ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
    7677
    7778# BIOS Enhanced Disk Device
    78 KERNEL=="*[!0-9]",      IMPORT{program}="edd_id --export $tempnode"
    79 KERNEL=="*[!0-9]",      ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}"
    80 KERNEL=="*[0-9]",       ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n"
     79KERNEL=="*[!0-9]",      IMPORT{program}="edd_id --export $tempnode"
     80KERNEL=="*[!0-9]",      ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}"
     81KERNEL=="*[0-9]",       ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n"
    8182
    8283LABEL="persistent_storage_end"
  • udev/61-persistent-input.rules

    r2b92d03 r95756c0  
    2020
    2121# usb devices
    22 BUS=="usb", IMPORT{program}="usb_id -x"
    23 BUS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01", ENV{ID_CLASS}="kbd"
    24 BUS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="02", ENV{ID_CLASS}="mouse"
     22SUBSYSTEMS=="usb", IMPORT{program}="usb_id -x"
     23SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01", ENV{ID_CLASS}="kbd"
     24SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="02", ENV{ID_CLASS}="mouse"
    2525
    2626# other devices
    27 DRIVERS=="pcspkr", ENV{ID_CLASS}="spkr"
    28 DRIVERS=="atkbd", ENV{ID_CLASS}="kbd"
    29 DRIVERS=="psmouse", ENV{ID_CLASS}="mouse"
    30 ATTRS{name}=="*dvb*|*DVB*|* IR *", ENV{ID_CLASS}="ir"
    31 ATTRS{modalias}=="input:*-*a[068],*|input:*-*a*,[68],*m*", ATTRS{modalias}!="input:*-*k*14A,*r*", ENV{ID_CLASS}="joystick"
     27DRIVERS=="pcspkr",                                              ENV{ID_CLASS}="spkr"
     28DRIVERS=="atkbd",                                               ENV{ID_CLASS}="kbd"
     29DRIVERS=="psmouse",                                             ENV{ID_CLASS}="mouse"
     30ATTRS{name}=="*dvb*|*DVB*|* IR *",                              ENV{ID_CLASS}="ir"
     31ATTRS{modalias}=="input:*-*a[068],*|input:*-*a*,[68],*m*",      ATTRS{modalias}!="input:*-*k*14A,*r*", ENV{ID_CLASS}="joystick"
    3232
    33 ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial"
     33# fill empty serial number
     34ENV{ID_CLASS}=="?*", ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial"
    3435
    3536# by-id links
    36 KERNEL=="mouse*", ENV{ID_BUS}=="?*", ENV{ID_SERIAL}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}"
    37 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}"
     37KERNEL=="mouse*|js*",   ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}"
     38KERNEL=="event*",       ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{ID_CLASS}"
    3839
    3940# by-path
    4041IMPORT{program}="path_id %p"
    41 ENV{ID_PATH}=="?*", KERNEL=="mouse*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}"
    42 ENV{ID_PATH}=="?*", KERNEL=="event*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}"
     42ENV{ID_PATH}=="?*", KERNEL=="mouse*|js*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}"
     43ENV{ID_PATH}=="?*", KERNEL=="event*", SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{ID_CLASS}"
    4344
    4445LABEL="persistent_input_end"
  • udev/64-device-mapper.rules

    r2b92d03 r95756c0  
    1414#               of this package
    1515#
     16# Requirements: mdadm 2.6.2 or higher
     17#
    1618########################################################################
    1719
    18 KERNEL=="device-mapper", SYMLINK+="mapper/control"
     20KERNEL=="device-mapper",        SYMLINK+="mapper/control"
    1921
    20 KERNEL=="dm-*", ACTION=="add|change", GOTO="device_mapper_do"
    21 GOTO="device_mapper_end"
     22KERNEL!="dm-*",         GOTO="device_mapper_end"
     23ACTION!="add|change",   GOTO="device_mapper_end"
    2224
    23 LABEL="device_mapper_do"
    24 PROGRAM!="/sbin/dmsetup status -j %M -m %m",    GOTO="device_mapper_end"
    25 RESULT=="|*snapshot*|*error*",                  GOTO="device_mapper_end"
     25# skip snapshot and error tables
     26IMPORT{program}="/sbin/dmsetup export -j%M -m%m"
     27ENV{DM_STATE}!="ACTIVE",                        GOTO="device_mapper_end"
     28ENV{DM_TARGET_TYPES}=="|*snapshot*|*error*",    GOTO="device_mapper_end"
     29
     30SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}"
     31ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}"
    2632
    2733IMPORT{program}="vol_id --export $tempnode"
    28 ENV{ID_FS_USAGE}=="filesystem|other|crypto",    ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
    29 ENV{ID_FS_USAGE}=="filesystem|other",           ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
     34OPTIONS="link_priority=-100"
     35ENV{ID_FS_USAGE}=="filesystem|other|crypto",    ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
     36ENV{ID_FS_USAGE}=="filesystem|other",           ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
    3037
    3138LABEL="device_mapper_end"
    32 
  • udev/Makefile

    r2b92d03 r95756c0  
    8686        @echo "make install                     install udev rules package and helper scripts"
    8787        @echo "make install-device-mapper       install device-mapper rules"
     88        @echo "make install-dm                  install dm rules"
    8889        @echo "make install-netboot             install udev rules package for netboot"
    8990        @echo "make install-network             install network helper package"
     
    101102        install -m 644 contrib/common/udev_helper ${DESTDIR}/etc/sysconfig/udev_helper
    102103       
     104install-dm: install-device-mapper
     105
    103106install-device-mapper:
    104107        install -d ${DESTDIR}/${LIBDIR}/udev
    105108        install -d ${DESTDIR}/etc/rc.d/init.d
    106109        install -m ${RULESMODE} 64-device-mapper.rules ${DESTDIR}/etc/udev/rules.d/64-device-mapper.rules
     110        install -m ${RULESMODE} 65-dm-raid.rules ${DESTDIR}/etc/udev/rules.d/65-dm-raid.rules
    107111
    108112install-network: install-helper-functions install-network-update
     
    127131.PHONY: all install device_dirs device_links rules scripts boot mknod_devices \
    128132        help install-helper-functions install-network install-network-update \
    129         install-netboot rules-netboot
     133        install-netboot rules-netboot install-dm install-device-mapper \
     134        install-sound
Note: See TracChangeset for help on using the changeset viewer.