mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-02-19 02:31:30 +01:00
add hotplug scripts, hash update
This commit is contained in:
parent
94ecc5f614
commit
01f0c60e72
3 changed files with 37 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||
PKG_NAME:=libmobile
|
||||
PKG_VERSION:=0.1
|
||||
|
||||
PKG_SOURCE_VERSION:=25051135208bdbabc6c42216da791919971c4e92
|
||||
PKG_SOURCE_VERSION:=74645bced6e0d883098c45bb6bdcc89bdf85d979
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=git@public.inteno.se:mobile-api.git
|
||||
|
||||
|
|
|
|||
10
libmobile/files/etc/hotplug.d/iface/99-mdmngr
Executable file
10
libmobile/files/etc/hotplug.d/iface/99-mdmngr
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
if echo $DEVICE | grep "eth";then
|
||||
#echo "time to update due to eth!" > /dev/console
|
||||
ubus call dongle update
|
||||
fi
|
||||
|
||||
if echo $DEVICE | grep "usb";then
|
||||
#echo "time to update due to usb!" > /dev/console
|
||||
ubus call dongle update
|
||||
fi
|
||||
|
||||
26
libmobile/files/etc/hotplug.d/usb/99-mdmngr
Executable file
26
libmobile/files/etc/hotplug.d/usb/99-mdmngr
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
#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
|
||||
#echo "JUNK: $JUNK" > /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
|
||||
;;
|
||||
esac
|
||||
|
||||
Loading…
Add table
Reference in a new issue