#!/bin/sh # Hotplug script for REX600 MicroPDA usb docking station # Based on sample script from # For more information check # or contact post+rex@bakketun.net. # Assumes 2002_04_11 release of fxload (or later) FIRMWARE= FLAGS= LOADER=/sbin/fxload # pre-renumeration device IDs case $PRODUCT in # (USB 1.1) REX 6000 MicroPDA usb docking station firmware download 85a/802c/*) FIRMWARE=/usr/share/usb/rexdock.hex FLAGS="-t an21" ;; # (USB 1.1) REX 6000 MicroPDA usb docking station using usbserial 85a/2c/*) /sbin/modprobe usbserial vendor=0x85a product=0x2c ;; # other pre-renumeration IDs could go here # but most would fit one of the two cases above esac # quit unless we were called to download some firmware if [ "$FIRMWARE" = "" ]; then # OR: restructure to do other things for # specific post-renumeration devices exit 0 fi # missing firmware? if [ ! -r $FIRMWARE ]; then if [ -x /usr/bin/logger ]; then /usr/bin/logger -t $0 "missing $FIRMWARE for $PRODUCT ??" fi exit 1 fi # missing loader? if [ ! -x $LOADER ]; then if [ -x /usr/bin/logger ]; then /usr/bin/logger -t $0 "missing $LOADER ??" fi exit 1 fi if [ -x /usr/bin/logger ]; then /usr/bin/logger -t $0 "load $FIRMWARE for $PRODUCT to $DEVICE" fi $LOADER $FLAGS -I $FIRMWARE