chiark / gitweb /
write_cd_rules: set default link type to "by-id" for usb and ieee1394 devices
authorMatthias Schwarzott <zzam@gentoo.org>
Thu, 22 Mar 2007 20:05:56 +0000 (21:05 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Thu, 22 Mar 2007 20:05:56 +0000 (21:05 +0100)
extras/rule_generator/write_cd_rules

index 1dbe6b7..bd951c5 100644 (file)
@@ -53,7 +53,15 @@ fi
 if [ "$1" ]; then
        METHOD="$1"
 else
-       METHOD='by-path'
+       case "$ID_BUS" in
+               usb|ieee1394)
+               METHOD='by-id'
+               ;;
+
+               *)
+               METHOD='by-path'
+               ;;
+       esac
 fi
 
 case "$METHOD" in