summaryrefslogtreecommitdiffstats
path: root/abs/core/linhes-udev-rules/75-cd-aliases-generator.rules
blob: ee9b0c9089329fc3caaedfc6cb17f0dd812a5657 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Udev rules for creating CD/DVD symlinks
# do not edit this file, it will be overwritten on update


#####################################
###### CD/DVD symlinks - begin
#####################################
ACTION=="add|change", SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", IMPORT="cdrom_id --export $tempnode"
ACTION=="add|change", SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", IMPORT="cdrom_id --export $tempnode"
ACTION=="add|change", SUBSYSTEMS=="scsi", KERNEL=="scd[a-z]", IMPORT="cdrom_id --export $tempnode"
ENV{ID_CDROM}=="?*", SYMLINK+="cd/cdrom-%b"
ENV{ID_CDROM_CD_RW}=="?*", SYMLINK+="cd/cdrw-%b"
ENV{ID_CDROM_DVD}=="?*", SYMLINK+="cd/dvd-%b"
ENV{ID_CDROM_DVD_R}=="?*", SYMLINK+="cd/dvdrw-%b"

#ACTION=="add|change", SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", ATTRS{media}=="cdrom*", ENV{GENERATED}!="?*", RUN+="write_cd_rules" , SYMLINK+="%c"
#ACTION=="add|change", SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", ATTRS{type}=="5", RUN+="write_cd_rules"
#ACTION=="add|change", SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="5", RUN+="write_cd_rules"

ACTION=="add|change", SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", ATTRS{media}=="cdrom*", ENV{GENERATED}!="?*", RUN+="write_cd_rules" , SYMLINK+="%c"
ACTION=="add|change", SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", ATTRS{type}=="5", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules", SYMLINK+="%c"
ACTION=="add|change", SUBSYSTEMS=="scsi", KERNEL=="sg[0-9]*", ATTRS{type}=="5", ENV{GENERATED}!="?*",SYMLINK+="%c" RUN+="write_cd_rules"

#ACTION=="add", SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules", SYMLINK+="%c"



#ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="hd[a-z]", RUN+="write_cd_rules by-id"
#ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="sr[0-9]*", RUN+="write_cd_rules by-id"
#ACTION=="remove", SUBSYSTEMS=="block", KERNEL=="sg[0-9]*", RUN+="write_cd_rules by-id"
#####################################
###### CD/DVD symlinks - end
#####################################