mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-15 04:53:00 +08:00
🎨 Sync 2026-10-12 21:43:19
This commit is contained in:
1 parent
3a82c347ab
commit
bfe30ffbef
51 files changed
+8523
-149
No files matched your search
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
# USB Hotplug Event Handler for Cellular Modems
|
||||
# Dante <dante@seckv.com>
|
||||
|
||||
[ "$DEVTYPE" = "usb_device" ] || exit 0
|
||||
|
||||
case "$ACTION" in
|
||||
add|bind|remove)
|
||||
# Delay slightly to allow sysfs device tree and tty nodes to settle
|
||||
(
|
||||
sleep 1
|
||||
/usr/libexec/modem-detect --cache >/dev/null 2>&1
|
||||
which ubus >/dev/null 2>&1 && ubus send modem.device.change "{\"action\":\"$ACTION\",\"dev\":\"$DEVICENAME\"}" 2>/dev/null || true
|
||||
) &
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
Reference in new issue
Block a user