-# import optical drive properties
+# do not edit this file, it will be overwritten on update
-ACTION=="add|change", KERNEL=="sr[0-9]*|hd[a-z]|pcd[0-9]*", IMPORT{program}="cdrom_id --export $tempnode"
+# import optical drive properties
+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", \
+ KERNEL=="sr[0-9]*|hd[a-z]|pcd[0-9]|xvd*", IMPORT{program}="cdrom_id --export $tempnode"
}
/* check drive */
- if (cd_inquiry(udev, fd) < 0) {
- rc = 2;
- goto exit;
- }
+ if (cd_inquiry(udev, fd) < 0)
+ goto print;
/* read drive and possibly current profile */
if (cd_profiles(udev, fd) < 0)