chiark / gitweb /
write_cd_rules: set default link type to "by-id" for usb and ieee1394 devices
[elogind.git] / 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