On my Ubuntu 10.04 device I have a startup script which checks for update package (bin file) on USB stick. If a file exists, it starts update procedure otherwise it exits. In a current script version I use automount feature of Ubuntu so I always have to wait a few seconds until USB gets mounted. The usb may be FAT16, FAT32 or NTFS.
Questions: Is it possible to check in my startup script if usb device has been inserted on startup and automatically mount it ?
if [ $USB_drive_connected && $update_file_exist] then do_update() fi