#! /bin/sh
ln -s /mnt/uba1/gps /UNIONFS/root/.gpsdrive

device=`fakedmesg | sed -nr 's/^usb.*PL-2303 converter now attached to (.*)/\1/g;t p;b;:p p'`
if [ ! -z $device ]; then
	/mnt/uba1/gps/bin/gpsdrive -t /dev/$device -q
else
	echo "No PL-2303 found!"
fi
