Skip to content
Snippets Groups Projects
Commit dfce8441 authored by Arun Muthusamy's avatar Arun Muthusamy
Browse files

basic hotplug script that detects dongle add/remove event

parent c118dd6a
No related branches found
No related tags found
No related merge requests found
echo "2222222 $DEVTYPE " > /dev/console
echo "2222222 $DEVPATH " > /dev/console
echo "2222222 $ACTION " > /dev/console
echo "2222222 $SEQNUM " > /dev/console
echo "2222222 $SUBSYSTEM " > /dev/console
#parse the path..
path=$(echo $DEVPATH | awk -F'/' '{print$6}')
echo "2222222 $path " > /dev/console
echo `cat /sys/bus/usb/devices/$path/idVendor` > /dev/console
echo `cat /sys/bus/usb/devices/$path/idProduct` > /dev/console
echo `cat /sys/bus/usb/devices/$path/manufacturer` > /dev/console
echo `cat /sys/bus/usb/devices/$path/ID` > /dev/console
case "$ACTION" in
add)
echo "2222222 add action"
# ubus call
;;
remove)
echo "2222222 remove action"
# ubus call
;;
esac
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment