I'm working on replacing Debian Squeeze with FreeBSD 8.2 for a kiosk machine and one of the last quirks to iron out is FreeBSD's handling of SD cards.
My problem is that upon boot or inserting the card reader (without the SD card) /dev/da0 is created so inserting/pulling out the SD card does not create any events I know of.
When inserting the SD card now there is no action but if I do e.g. [cmd=]true > /dev/da0[/cmd] the system works as intended - /dev/da0s1 is created and devd runs my mount script so the SD card is mounted the correct way.
However this is not optimal for a kiosk solution where the user has no keyboard mouse and the system is supposed to unlock/react to the SD card being inserted. This was trivial to set up in Debian via udev but I can't figure out how to get the same functionality in FreeBSD.
Any help would be appreciated - the kiosk boots with the card reader attached and then users inserts/pulls out their SD cards and I need to run a script based upon insertion/pulling out.
My problem is that upon boot or inserting the card reader (without the SD card) /dev/da0 is created so inserting/pulling out the SD card does not create any events I know of.
Code:
Dec 9 03:52:51 zero kernel: da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
Dec 9 03:52:51 zero kernel: da0: <Generic- Card Reader 1.00> Removable Direct Access SCSI-0 device
Dec 9 03:52:51 zero kernel: da0: 40.000MB/s transfers
Dec 9 03:52:51 zero kernel: da0: Attempt to query device size failed: NOT READY, Medium not present
When inserting the SD card now there is no action but if I do e.g. [cmd=]true > /dev/da0[/cmd] the system works as intended - /dev/da0s1 is created and devd runs my mount script so the SD card is mounted the correct way.
However this is not optimal for a kiosk solution where the user has no keyboard mouse and the system is supposed to unlock/react to the SD card being inserted. This was trivial to set up in Debian via udev but I can't figure out how to get the same functionality in FreeBSD.
Any help would be appreciated - the kiosk boots with the card reader attached and then users inserts/pulls out their SD cards and I need to run a script based upon insertion/pulling out.