Skip to content
Snippets Groups Projects
dongle_hotplug 675 B
Newer Older
  • Learn to ignore specific revisions
  • #echo "DEVTYPE - $DEVTYPE " > /dev/console
    #echo "DEVPATH - $DEVPATH " > /dev/console
    
    
    DEV_MOUNTPATH=`echo "$DEVPATH" | cut -d'/' -f 1-7`
    JUNK=`echo "$DEVPATH" | cut -d'/' -f 8`
    #echo "dev_path: $DEVPATH" > /dev/console
    
    #echo "dongle path: $DEV_MOUNTPATH" > /dev/console
    
    
    case "$ACTION" in
    
    	add)
    		if [ -z "$JUNK" ];then
    			ubus call dongle alert '{"path":"/sys'${DEV_MOUNTPATH}'"}'
    			echo "ubus call dongle alert '{\"path\":\"/sys$DEV_MOUNTPATH\"}'" > /dev/console
    			touch /tmp/donglehotplug
    		fi
    		;;
    	remove)
    		echo "dongle removed!"
    		ubus call dongle update
    		;;
    	*)
    		echo "Action: Neither add nor remove" > /dev/console
    		;;