source: udev/50-udev.rules@ e3fd238

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since e3fd238 was 7e161ea, checked in by Jim Gifford <clfs@…>, 19 years ago

r833@server (orig r831): jim | 2005-12-05 10:42:24 -0800
Added: udev package for Cross-LFS. Work in Progress

  • Property mode set to 100644
File size: 7.6 KB
RevLine 
[7e161ea]1########################################################################
2#
3# Description : Base Udev Rules Set
4#
5# Authors : Based on Open Suse Udev Rules
6# kay.sievers@suse.de
7#
8# Adapted to : Jim Gifford
9# LFS
10#
11# Version : 00.01
12#
13# Notes :
14#
15########################################################################
16
17# ignore these events until someone needs them
18SUBSYSTEM=="drivers", OPTIONS="last_rule"
19SUBSYSTEM=="module", OPTIONS="last_rule"
20
21# console
22KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
23KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
24KERNEL=="vcs*", NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
25KERNEL=="vcsa*", NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
26KERNEL=="tty", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
27KERNEL=="tty[0-9]*", NAME="%k", GROUP="tty", MODE="620", OPTIONS="last_rule"
28KERNEL=="console", NAME="%k", MODE="600", OPTIONS="last_rule"
29KERNEL=="ptmx", NAME="%k", GROUP="tty", MODE="666", OPTIONS="last_rule"
30
31# serial devices
32KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp"
33KERNEL=="pppox*", NAME="%k", GROUP="uucp"
34KERNEL=="ircomm*", NAME="%k", GROUP="uucp"
35KERNEL=="modems/mwave*", NAME="%k", GROUP="uucp"
36KERNEL=="hvc*", NAME="%k", GROUP="uucp"
37KERNEL=="hvsi*", NAME="%k", GROUP="uucp"
38KERNEL=="iseries/vtty*", NAME="%k", GROUP="uucp"
39KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot"
40
41# video/graphics
42SUBSYSTEM=="video4linux", GROUP="video"
43SUBSYSTEM=="graphics" GROUP="video"
44KERNEL=="vtx*", NAME="%k", GROUP="video"
45KERNEL=="vbi*", NAME="%k", GROUP="video"
46KERNEL=="winradio*", NAME="%k", GROUP="video"
47KERNEL=="vttuner*", NAME="%k", GROUP="video"
48KERNEL=="nvidia*", NAME="%k", GROUP="video"
49KERNEL=="nvidiactl*", NAME="%k", GROUP="video"
50KERNEL=="video0", SYMLINK+="video"
51KERNEL=="radio0", SYMLINK+="radio"
52KERNEL=="vbi0", SYMLINK+="vbi"
53KERNEL=="pmu", GROUP="video"
54
55# dvb
56SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%i $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="video"
57
58# Kino jogshuttle support
59SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="b33/10/*", RUN+="/usr/bin/killall --quiet -USR2 kino"
60SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="5f3/240/*", RUN+="/usr/bin/killall --quiet -USR2 kino"
61
62# input devices
63KERNEL=="mice", NAME="input/%k", MODE="0640"
64KERNEL=="mouse*", NAME="input/%k", MODE="0640"
65KERNEL=="event*", NAME="input/%k", MODE="0640"
66KERNEL=="js*", NAME="input/%k", MODE="0644"
67KERNEL=="ts*", NAME="input/%k", MODE="0600"
68KERNEL=="uinput", NAME="input/%k", MODE="0600"
69KERNEL=="lirc0", NAME="%k", SYMLINK+="lirc"
70KERNEL=="input[0-9]*", RUN+="/lib/udev/input_device.sh"
71KERNEL=="input[0-9]*", ACTION=="add", ENV{ABS}=="[1-9]*", RUN+="/sbin/modprobe joydev"
72
73# printer
74SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"
75SUBSYSTEM=="printer", KERNEL=="lp*", NAME="%k", GROUP="lp"
76KERNEL=="irlpt*", NAME="%k", GROUP="lp"
77
78# cpu devices
79KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
80KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
81KERNEL=="microcode", NAME="cpu/microcode", MODE="0600"
82
83# IEEE1394 devices
84KERNEL=="raw1394*", NAME="%k", GROUP="video"
85KERNEL=="dv1394*", NAME="%k", SYMLINK+="dv1394/%n", GROUP="video"
86KERNEL=="video1394*", NAME="%k", SYMLINK+="video1394/%n", GROUP="video"
87
88# 183 = /dev/hwrng Generic random number generator
89KERNEL=="hw_random", NAME="hwrng", SYMLINK+="%k"
90# 219 /dev/modems/mwave MWave modem firmware upload
91KERNEL=="mwave", NAME="modems/%k"
92# 169 /dev/specialix_rioctl Specialix RIO serial control
93KERNEL=="rioctl", NAME="specialix_rioctl", SYMLINK+="%k"
94# 167 /dev/specialix_sxctl Specialix serial control
95KERNEL=="sxctl", NAME="specialix_sxctl", SYMLINK+="%k"
96
97# misc devices
98KERNEL=="mem", NAME="%k", GROUP="kmem", MODE="640"
99KERNEL=="kmem", NAME="%k", GROUP="kmem", MODE="640"
100KERNEL=="port", NAME="%k", GROUP="kmem", MODE="640"
101KERNEL=="nvram", NAME="%k", GROUP="kmem", MODE="600"
102KERNEL=="null", NAME="%k", MODE="666"
103KERNEL=="zero", NAME="%k", MODE="666"
104KERNEL=="full", NAME="%k", MODE="622"
105KERNEL=="random", NAME="%k", MODE="666"
106KERNEL=="urandom", NAME="%k", MODE="644"
107KERNEL=="rtc", GROUP="audio"
108KERNEL=="sonypi", MODE="0666"
109KERNEL=="agpgart", MODE="0600", GROUP="video"
110KERNEL=="djs*", NAME="%k", MODE="644"
111KERNEL=="sgi_*", NAME="%k", MODE="666"
112KERNEL=="rrom*", NAME="%k", MODE="400"
113KERNEL=="rflash*", NAME="%k", MODE="400"
114KERNEL=="usbscanner*", NAME="%k", MODE="644"
115KERNEL=="3270/ttycons*", NAME="%k", MODE="600"
116KERNEL=="3270/tub*", NAME="%k", MODE="666"
117KERNEL=="3270/tubcons*", NAME="%k", MODE="600"
118KERNEL=="ica", NAME="%k", MODE="666"
119KERNEL=="z90crypt", NAME="%k", MODE="666"
120KERNEL=="mmtimer", NAME="%k", MODE="444"
121KERNEL=="auer[0-9]*" NAME="usb/%k"
122
123KERNEL=="pktcdvd", NAME="pktcdvd/control"
124KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k"
125
126# fix floppy devices
127KERNEL=="nvram", ACTION=="add", RUN+="/lib/udev/load_floppy_module.sh"
128KERNEL=="fd*", ACTION=="add", SYSFS{device/cmos}=="*", RUN+="/lib/udev/create_floppy_devices -c -t $sysfs{device/cmos} -m %M /dev/%k"
129KERNEL=="fd*", ACTION=="remove", RUN+="/lib/udev/remove_floppy_devices.sh %k"
130
131# block devices
132SUBSYSTEM=="block", GROUP="disk", MODE="0640"
133
134# sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC
135# sr: 4 TYPE_WORM, 5 TYPE_ROM
136# st/osst: 1 TYPE_TAPE
137ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", RUN+="/bin/sh -c 'echo 60 > /sys/$DEVPATH/timeout'"
138ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", RUN+="/bin/sh -c 'echo 900 > /sys/$DEVPATH/timeout'"
139SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
140SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="1", SYSFS{device/vendor}=="On[sS]tream", RUN+="/sbin/modprobe osst"
141SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="1", RUN+="/sbin/modprobe st"
142SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="[45]", RUN+="/sbin/modprobe sr_mod"
143SUBSYSTEM=="scsi_device", ACTION=="add", RUN+="/sbin/modprobe sg"
144
145# IDE modules
146SUBSYSTEM=="ide", ACTION=="add", RUN+="/lib/udev/load_ide_modules.sh"
147
148# device mapper
149KERNEL=="device-mapper", ACTION=="add", NAME="%k", SYMLINK+="mapper/control"
150
151# check fstab and possibly mount
152SUBSYSTEM=="block", KERNEL=="sd*[0-9]|hd*[0-9]", ACTION=="add", RUN+="/lib/udev/mount.sh"
153
154# misc storage devices (non-block)
155KERNEL=="sg*", NAME="%k", GROUP="disk", MODE="640"
156KERNEL=="st*", NAME="%k", GROUP="disk"
157KERNEL=="nst*", NAME="%k", GROUP="disk"
158KERNEL=="initrd", NAME="%k", GROUP="disk"
159KERNEL=="qft*", NAME="%k", GROUP="disk"
160KERNEL=="nqft*", NAME="%k", GROUP="disk"
161KERNEL=="zqft*", NAME="%k", GROUP="disk"
162KERNEL=="nzqft*", NAME="%k", GROUP="disk"
163KERNEL=="rawqft*", NAME="%k", GROUP="disk"
164KERNEL=="nrawqft*", NAME="%k", GROUP="disk"
165KERNEL=="pf*", NAME="%k", GROUP="disk"
166KERNEL=="sch*", NAME="%k", GROUP="disk"
167KERNEL=="pt*", NAME="%k", GROUP="disk"
168KERNEL=="npt*", NAME="%k", GROUP="disk"
169KERNEL=="pg*", NAME="%k", GROUP="disk"
170KERNEL=="evms/block_device*", NAME="%k", GROUP="disk"
171KERNEL=="rawctl*", NAME="%k", GROUP="disk"
172KERNEL=="osst*", NAME="%k", GROUP="disk"
173KERNEL=="nosst*", NAME="%k", GROUP="disk"
174KERNEL=="iseries/vt*", NAME="%k", GROUP="disk"
175KERNEL=="iseries/nvt*", NAME="%k", GROUP="disk"
176KERNEL=="iseries/ibmsis*", NAME="%k", GROUP="disk"
177
178# libusb device access
179SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644"
180
181# firmware loader
182SUBSYSTEM=="firmware", ACTION=="add", RUN+="/lib/udev/firmware.sh"
Note: See TracBrowser for help on using the repository browser.