# dvds
KERNEL=="sr[0-9]*", ACTION=="add", SYMLINK="%k dvd", NAME="cdrom%U", PROGRAM="/usr/bin/iscd %N", RESULT=="DVD", RUN="/etc/udev/scripts/block_add", OPTIONS="last_rule"
KERNEL=="hd[a-z]",  ACTION=="add", SYMLINK="%k dvd", NAME="cdrom%U", SYSFS{removable}=="1", PROGRAM="/usr/bin/iscd %N", RESULT=="DVD", RUN="/etc/udev/scripts/block_add", OPTIONS="last_rule"

# cdroms
KERNEL=="sr[0-9]*", ACTION=="add",    SYMLINK="%k", NAME="cdrom%U", RUN="/etc/udev/scripts/block_add"
KERNEL=="hd[a-z]",  ACTION=="add",    SYMLINK="%k", NAME="cdrom%U", SYSFS{removable}=="1", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT=="cdrom", RUN="/etc/udev/scripts/block_add", OPTIONS="last_rule"

# disks
KERNEL=="[sh]d[a-z]", ACTION=="add",          SYMLINK="%k", NAME="disk%U",  RUN="/etc/udev/scripts/block_add"
KERNEL=="[sh]d[a-z][1-9]*", ACTION=="add",    SYMLINK="%k", NAME="%Ppart%n", RUN="/etc/udev/scripts/block_add"

# removal
KERNEL=="sr[0-9]*", ACTION=="remove", RUN="/etc/udev/scripts/block_remove"
KERNEL=="[sh]d[a-z]*", ACTION=="remove", RUN="/etc/udev/scripts/block_remove"
