# CD-ROM connected / media inject. notify 100 { match "system" "DEVFS"; match "type" "CREATE"; match "cdev" "(ugen)[0-9]+.*"; action "/usr/local/sbin/automount $cdev attach &"; }; notify 100 { match "system" "DEVFS"; match "type" "CREATE|MEDIACHANGE"; match "cdev" "(cd|da|md|mmcsd)[0-9]+.*"; action "/usr/local/sbin/automount $cdev attach &"; }; # CD-ROM media eject. notify 100 { match "system" "DEVFS"; match "type" "DESTROY"; match "cdev" "(cd|da|md|mmcsd|ugen)[0-9]+.*"; action "/usr/local/sbin/automount $cdev detach &"; }; # No media. notify 100 { match "system" "CAM"; match "subsystem" "periph"; match "type" "error"; match "cam_status" "0xcc"; match "scsi_status" "2"; match "scsi_sense" "70 02 3a 02"; match "device" "(cd)[0-9]+.*"; action "/usr/local/sbin/automount $device detach &"; };