chiark / gitweb /
rule-generator: cd - skip by-path links if we create by-id links
[elogind.git] / extras / rule_generator / 75-cd-aliases-generator.rules
index c3eb887cb58d6ca903c396d15b9d0998f2d95cb3..e6da0101d6e29c05b88920446bec0600a66ea4e8 100644 (file)
@@ -1,3 +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"