#!/bin/sh VID=`echo $PRODUCT | cut -d / -f 1` PID=`echo $PRODUCT | cut -d / -f 2` VID_PID=$VID/$PID USBTABLE=/hotplug/usbtable STYPE=`grep $VID_PID $USBTABLE | cut -f 2` SCRIPT=/hotplug/usb/$STYPE /usr/bin/logger -p 0 usb.agent $1 VID/PID is $VID_PID script is $SCRIPT if [ ! -z $STYPE ] && [ -x $SCRIPT ] ; then echo $SCRIPT $ACTION >>/sync/log exec $SCRIPT $ACTION exit 1 else echo /hotplug/usb/disc $ACTION >>/sync/log /hotplug/usb/disc $ACTION /hotplug/usb/wlan $ACTION exit 1 fi exit 0