summaryrefslogtreecommitdiff
path: root/extras/rule_generator/75-cd-aliases-generator.rules
diff options
context:
space:
mode:
Diffstat (limited to 'extras/rule_generator/75-cd-aliases-generator.rules')
-rw-r--r--extras/rule_generator/75-cd-aliases-generator.rules7
1 files changed, 5 insertions, 2 deletions
diff --git a/extras/rule_generator/75-cd-aliases-generator.rules b/extras/rule_generator/75-cd-aliases-generator.rules
index e357a6a8bd..e6da0101d6 100644
--- a/extras/rule_generator/75-cd-aliases-generator.rules
+++ b/extras/rule_generator/75-cd-aliases-generator.rules
@@ -1,6 +1,9 @@
# these rules generate rules for the /dev/{cdrom,dvd,...} symlinks
-# the path of removable devices changes frequently
-ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules by-id", SYMLINK+="%c"
+# 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"