It has one quirk with USB Mass Storage: When first plugged in, the partition table cannot be read for a few seconds. This causes a problem when using devfs, because the partition will not show up until you wait a few seconds, then touch the device (/dev/discs/disc#/disc). I set up a small script that will automatically touch the device when registered:
/sbin/touchdisk:
Code:
#!/bin/sh
devname=$1
partname=${devname%/*}/part1
echo "$devname $partname"
tries=30
go() {
while [ -a "$devname" ] && ! [ -a "$partname" ] && [ $tries -gt 0 ]; do
touch "$devname"
sleep 1;
tries=$((tries-1))
done
}
go&
And in /etc/devfsd.conf:
Code:
REGISTER ^scsi/.*/disc EXECUTE /sbin/touchdisk /dev/$devname