Changeset 95756c0
- Timestamp:
- May 24, 2007, 10:28:56 AM (18 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- 850f2ea6
- Parents:
- 2b92d03
- Location:
- udev
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
udev/50-udev.rules
r2b92d03 r95756c0 19 19 20 20 # 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" 21 KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0666", OPTIONS="last_rule" 22 KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", GROUP="tty", MODE="0666", OPTIONS="last_rule" 23 KERNEL=="tty", GROUP="tty", MODE="0666", OPTIONS="last_rule" 24 KERNEL=="tty[0-9]*|vcs*", GROUP="tty", MODE="0620", OPTIONS="last_rule" 25 KERNEL=="ptmx", GROUP="tty", MODE="0666", OPTIONS="last_rule" 26 KERNEL=="console", MODE="0600", OPTIONS="last_rule" 28 27 29 28 # serial devices … … 51 50 52 51 # input devices 53 KERNEL=="mouse*|mice", NAME="input/%k", MODE="0640" 54 KERNEL=="event*", NAME="input/%k", MODE="0640" 52 KERNEL=="mouse*|mice|event*", NAME="input/%k", MODE="0640" 55 53 KERNEL=="js*", NAME="input/%k", MODE="0644" 56 KERNEL=="ts*", NAME="input/%k", MODE="0600" 57 KERNEL=="uinput", NAME="input/%k", MODE="0600" 54 KERNEL=="ts*|uinput", NAME="input/%k", MODE="0600" 58 55 KERNEL=="lirc0", SYMLINK+="lirc" 59 56 … … 89 86 90 87 # 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" 88 KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640" 89 KERNEL=="nvram", GROUP="kmem", MODE="0600" 90 KERNEL=="null|zero|random", MODE="0666" 91 KERNEL=="full", MODE="0622" 92 KERNEL=="urandom", MODE="0644" 93 KERNEL=="rtc", MODE="0600" 94 KERNEL=="fuse", MODE="0666" 95 KERNEL=="sonypi", MODE="0666" 96 KERNEL=="agpgart", MODE="0600", GROUP="video" 97 KERNEL=="djs*", MODE="0644" 98 KERNEL=="sgi_*", MODE="0666" 99 KERNEL=="rrom*", MODE="0400" 100 KERNEL=="rflash*", MODE="0400" 101 KERNEL=="usbscanner*", MODE="0644" 102 KERNEL=="3270/ttycons*", MODE="0600" 103 KERNEL=="3270/tub*", MODE="0666" 104 KERNEL=="3270/tubcons*", MODE="0600" 105 KERNEL=="ica", MODE="0666" 106 KERNEL=="z90crypt", MODE="0666" 107 KERNEL=="mmtimer", MODE="0644" 108 KERNEL=="auer[0-9]*", NAME="usb/%k" 114 109 115 110 # packet writing interface … … 128 123 129 124 # misc storage devices (non-block) 130 KERNEL=="sg*", GROUP="disk", MODE=" 640"131 KERNEL=="sr*", GROUP="cdrom", MODE=" 660"125 KERNEL=="sg*", GROUP="disk", MODE="0640" 126 KERNEL=="sr*", GROUP="cdrom", MODE="0660" 132 127 KERNEL=="st*", GROUP="tape" 133 128 KERNEL=="nst*", GROUP="tape" … … 153 148 154 149 # 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" 150 SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644" 151 SUBSYSTEM=="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 15 15 ######################################################################## 16 16 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} 18 18 # scheme based on "Linux persistent device names", 2004, Hannes Reinecke <hare@suse.de> 19 19 20 ACTION!="add", 20 ACTION!="add", GOTO="persistent_storage_end" 21 21 22 22 KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -s %p -d $tempnode" … … 29 29 KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" 30 30 31 SUBSYSTEM!="block", 31 SUBSYSTEM!="block", GOTO="persistent_storage_end" 32 32 33 33 # skip rules for inappropriate block devices 34 34 KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="persistent_storage_end" 35 35 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() 37 KERNEL=="hd*[!0-9]", ATTRS{removable}=="1", DRIVERS=="ide-cs|ide-floppy", GOTO="persistent_storage_end" 38 KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_storage_end" 38 39 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 41 ATTR{whole_disk}=="", GOTO="persistent_storage_end" 42 42 43 43 # for partitions import parent information 44 KERNEL=="*[0-9]", IMPORT{parent}= ="ID_*"44 KERNEL=="*[0-9]", IMPORT{parent}="ID_*" 45 45 46 46 # 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"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" 50 50 51 51 KERNEL=="sd*[!0-9]|sr*|st*", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394" 52 52 KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="usb_id -x" 53 53 KERNEL=="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"54 KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode" 55 55 KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" 56 KERNEL=="sd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" 56 57 57 58 # 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"59 KERNEL=="sd*[!0-9]|sr*", ENV{ID_VENDOR}=="ATA", PROGRAM="ata_id $tempnode", ENV{ID_ATA_COMPAT}="$result" 60 KERNEL=="sd*[!0-9]|sr*", ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}" 61 KERNEL=="sd*[0-9]", ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}-part%n" 61 62 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"63 KERNEL=="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}" 64 KERNEL=="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" 64 65 65 66 # by-path (shortest physical path) … … 70 71 71 72 # by-label/by-uuid (filesystem properties) 72 KERNEL=="*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end"73 KERNEL=="*[!0-9]", ATTRS{removable}=="1", GOTO="persistent_storage_end" 73 74 IMPORT{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}"75 ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" 76 ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" 76 77 77 78 # BIOS Enhanced Disk Device 78 KERNEL=="*[!0-9]", 79 KERNEL=="*[!0-9]", 80 KERNEL=="*[0-9]", 79 KERNEL=="*[!0-9]", IMPORT{program}="edd_id --export $tempnode" 80 KERNEL=="*[!0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}" 81 KERNEL=="*[0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n" 81 82 82 83 LABEL="persistent_storage_end" -
udev/61-persistent-input.rules
r2b92d03 r95756c0 20 20 21 21 # 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"22 SUBSYSTEMS=="usb", IMPORT{program}="usb_id -x" 23 SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01", ENV{ID_CLASS}="kbd" 24 SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="02", ENV{ID_CLASS}="mouse" 25 25 26 26 # other devices 27 DRIVERS=="pcspkr", ENV{ID_CLASS}="spkr"28 DRIVERS=="atkbd", ENV{ID_CLASS}="kbd"29 DRIVERS=="psmouse", 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"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" 32 32 33 ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial" 33 # fill empty serial number 34 ENV{ID_CLASS}=="?*", ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial" 34 35 35 36 # 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}"37 KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}" 38 KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{ID_CLASS}" 38 39 39 40 # by-path 40 41 IMPORT{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}"42 ENV{ID_PATH}=="?*", KERNEL=="mouse*|js*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}" 43 ENV{ID_PATH}=="?*", KERNEL=="event*", SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{ID_CLASS}" 43 44 44 45 LABEL="persistent_input_end" -
udev/64-device-mapper.rules
r2b92d03 r95756c0 14 14 # of this package 15 15 # 16 # Requirements: mdadm 2.6.2 or higher 17 # 16 18 ######################################################################## 17 19 18 KERNEL=="device-mapper", 20 KERNEL=="device-mapper", SYMLINK+="mapper/control" 19 21 20 KERNEL =="dm-*", ACTION=="add|change", GOTO="device_mapper_do"21 GOTO="device_mapper_end"22 KERNEL!="dm-*", GOTO="device_mapper_end" 23 ACTION!="add|change", GOTO="device_mapper_end" 22 24 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 26 IMPORT{program}="/sbin/dmsetup export -j%M -m%m" 27 ENV{DM_STATE}!="ACTIVE", GOTO="device_mapper_end" 28 ENV{DM_TARGET_TYPES}=="|*snapshot*|*error*", GOTO="device_mapper_end" 29 30 SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}" 31 ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}" 26 32 27 33 IMPORT{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}" 34 OPTIONS="link_priority=-100" 35 ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" 36 ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" 30 37 31 38 LABEL="device_mapper_end" 32 -
udev/Makefile
r2b92d03 r95756c0 86 86 @echo "make install install udev rules package and helper scripts" 87 87 @echo "make install-device-mapper install device-mapper rules" 88 @echo "make install-dm install dm rules" 88 89 @echo "make install-netboot install udev rules package for netboot" 89 90 @echo "make install-network install network helper package" … … 101 102 install -m 644 contrib/common/udev_helper ${DESTDIR}/etc/sysconfig/udev_helper 102 103 104 install-dm: install-device-mapper 105 103 106 install-device-mapper: 104 107 install -d ${DESTDIR}/${LIBDIR}/udev 105 108 install -d ${DESTDIR}/etc/rc.d/init.d 106 109 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 107 111 108 112 install-network: install-helper-functions install-network-update … … 127 131 .PHONY: all install device_dirs device_links rules scripts boot mknod_devices \ 128 132 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.