summaryrefslogtreecommitdiff
path: root/rule_generator/75-cd-aliases-generator.rules
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2012-12-13 09:11:49 -0500
committerAnthony G. Basile <blueness@gentoo.org>2013-04-04 10:19:35 -0400
commit85085621ba3e4b695e505848b5778fc36432b7b8 (patch)
tree6a79cbc2873b3bd3491244dd5b463c242b49840c /rule_generator/75-cd-aliases-generator.rules
parent9315b3d16fe2fd451414095a5829786f42d1fb23 (diff)
Restored the rule generator bits from udev-171
This restores the rule generator scripts for the persistent network and optical device rule generator scripts that were removed after udev-171, and re-introduces their installation to the build system. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'rule_generator/75-cd-aliases-generator.rules')
-rw-r--r--rule_generator/75-cd-aliases-generator.rules9
1 files changed, 9 insertions, 0 deletions
diff --git a/rule_generator/75-cd-aliases-generator.rules b/rule_generator/75-cd-aliases-generator.rules
new file mode 100644
index 0000000000..e6da0101d6
--- /dev/null
+++ b/rule_generator/75-cd-aliases-generator.rules
@@ -0,0 +1,9 @@
+# these rules generate rules for the /dev/{cdrom,dvd,...} symlinks
+
+# the "path" of usb/ieee1394 devices changes frequently, use "id"
+ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", \
+ PROGRAM="write_cd_rules by-id", SYMLINK+="%c", GOTO="persistent_cd_end"
+
+ACTION=="add", SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules", SYMLINK+="%c"
+
+LABEL="persistent_cd_end"