]> err.no Git - systemd/commitdiff
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 1dbe6b70dea1a033fd32dc3c26643ae14d991775..bd951c51464615aef62bbf0654576d1b6247ba42 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