Update 9990-misc-helpers.sh to support latest udev version [Closes: issue1278]
[live-boot-grml.git] / debian / patches / 43_fix_udev_usage_in_is_nice_device.patch
diff --git a/debian/patches/43_fix_udev_usage_in_is_nice_device.patch b/debian/patches/43_fix_udev_usage_in_is_nice_device.patch
new file mode 100644 (file)
index 0000000..9afca56
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/scripts/boot/9990-misc-helpers.sh
++++ b/scripts/boot/9990-misc-helpers.sh
+@@ -117,7 +117,7 @@
+ {
+       sysfs_path="${1#/sys}"
+-      if /sbin/udevadm test-builtin path_id "${sysfs_path}" | egrep -q "ID_PATH=(usb|pci-[^-]*-(ide|sas|scsi|usb|virtio)|platform-sata_mv|platform-orion-ehci|platform-mmc|platform-mxsdhci)"
++      if /sbin/udevadm info --query=all --path="${sysfs_path}" | egrep -q "DEVTYPE=disk"
+       then
+               return 0
+       elif echo "${sysfs_path}" | grep -q '^/block/vd[a-z]$'