Newer
Older
#echo "DEVTYPE - $DEVTYPE " > /dev/console
#echo "DEVPATH - $DEVPATH " > /dev/console
Jakob Olsson
committed
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
Jakob Olsson
committed
#echo "JUNK: $JUNK" > /dev/console
Jakob Olsson
committed
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
;;