From: Marco d'Itri Date: Tue, 7 Aug 2007 08:37:58 +0000 (+0200) Subject: rules_generator: remove policy from write_cd_rules X-Git-Tag: 174~1864 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14e1e49484401d573eac1a99002242dbf7c072f0;p=systemd 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. --- diff --git a/extras/rule_generator/75-cd-aliases-generator.rules b/extras/rule_generator/75-cd-aliases-generator.rules index c3eb887c..e357a6a8 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 bd951c51..1dbe6b70 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