1 | ########################################################################
|
---|
2 | #
|
---|
3 | # Description : 35-helper.rules
|
---|
4 | #
|
---|
5 | # Authors : Based on Open Suse Udev Rules
|
---|
6 | # kay.sievers@suse.de
|
---|
7 | #
|
---|
8 | # Adapted to : Jim Gifford
|
---|
9 | # LFS : Alexander E. Patrakov
|
---|
10 | #
|
---|
11 | # Version : 00.01
|
---|
12 | #
|
---|
13 | # Notes :
|
---|
14 | #
|
---|
15 | ########################################################################
|
---|
16 |
|
---|
17 | # kernel firmware loader
|
---|
18 | SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware_helper"
|
---|
19 |
|
---|
20 | # check cdrom helper
|
---|
21 | BUS=="ide", KERNEL=="hd[a-z]", ACTION=="add", IMPORT="/sbin/cdrom_id --export $tempnode"
|
---|
22 | BUS=="scsi", KERNEL=="sr[0-9]*", ACTION=="add", IMPORT="/sbin/cdrom_id --export $tempnode"
|
---|
23 | BUS=="scsi", KERNEL="scd[a-z]", ACTION=="add", IMPORT="/sbin/cdrom_id --export $tempnode"
|
---|
24 | BUS=="scsi", KERNEL=="sg[0-9]*", ACTION=="add", DRIVER=="sr", GROUP="cdrom"
|
---|
25 |
|
---|
26 | ENV{ID_CDROM}=="?*", SYMLINK+="cdrom%m", GROUP="cdrom"
|
---|
27 | ENV{ID_CDROM_CD_R}=="?*", SYMLINK+="cdr%m"
|
---|
28 | ENV{ID_CDROM_CD_RW}=="?*", SYMLINK+="cdrw%m"
|
---|
29 | ENV{ID_CDROM_DVD}=="?*", SYMLINK+="dvd%m"
|
---|
30 | ENV{ID_CDROM_DVD_R}=="?*", SYMLINK+="dvdrw%m"
|
---|
31 |
|
---|
32 | # Run network stuff when the network device is loaded
|
---|
33 | ACTION=="add", SUBSYSTEM=="net", ENV{INTERFACE}=="*", RUN+="network_helper.sh"
|
---|
34 | ACTION=="remove", SUBSYSTEM=="net", ENV{INTERFACE}=="*", RUN+="network_helper.sh"
|
---|
35 |
|
---|
36 | # adds floppy devices
|
---|
37 | KERNEL=="fd[0-9]*", ACTION=="add", SYSFS{cmos}=="*", RUN+="create_floppy_devices -c -t $sysfs{cmos} -m %M /dev/%k"t
|
---|