diff options
author | Marco d'Itri <md@Linux.IT> | 2007-08-07 10:37:58 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2007-08-07 10:37:58 +0200 |
commit | 14e1e49484401d573eac1a99002242dbf7c072f0 (patch) | |
tree | 22a7c72104a5308d95e9a65c2a840a65cadebbb8 | |
parent | 585e83885622af3b915b92bee71a575a11a6943a (diff) |
rules_generator: remove policy from write_cd_rules
The decision about when to create by-id or by-path persistent rules should
be made in the generator rules file where it's obvious and easy to modify
locally, not in the script.
-rw-r--r-- | extras/rule_generator/75-cd-aliases-generator.rules | 3 | ||||
-rw-r--r-- | extras/rule_generator/write_cd_rules | 10 |
2 files changed, 4 insertions, 9 deletions
diff --git a/extras/rule_generator/75-cd-aliases-generator.rules b/extras/rule_generator/75-cd-aliases-generator.rules index c3eb887cb5..e357a6a8bd 100644 --- a/extras/rule_generator/75-cd-aliases-generator.rules +++ b/extras/rule_generator/75-cd-aliases-generator.rules @@ -1,3 +1,6 @@ # 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" + ACTION=="add", SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", PROGRAM="write_cd_rules", SYMLINK+="%c" diff --git a/extras/rule_generator/write_cd_rules b/extras/rule_generator/write_cd_rules index bd951c5146..1dbe6b70de 100644 --- a/extras/rule_generator/write_cd_rules +++ b/extras/rule_generator/write_cd_rules @@ -53,15 +53,7 @@ fi if [ "$1" ]; then METHOD="$1" else - case "$ID_BUS" in - usb|ieee1394) - METHOD='by-id' - ;; - - *) - METHOD='by-path' - ;; - esac + METHOD='by-path' fi case "$METHOD" in |