Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#1902 - Hotplug event too early on reboot #6832

Closed
openwrt-bot opened this issue Oct 20, 2018 · 0 comments
Closed

FS#1902 - Hotplug event too early on reboot #6832

openwrt-bot opened this issue Oct 20, 2018 · 0 comments
Labels

Comments

@openwrt-bot
Copy link

Greek64:

DEVICE: TP-Link Archer C7 v2
SYSTEM: OpenWRT 18.06.1
PACKAGES: base + luci, ca-certificates, ddns-scripts_no-ip_com, luci-app-ddns, wget, ip, ppp, ppp-mod-pppoe, vim, nano, usbutils, usb-modeswitch, kmod-usb-core,
kmod-usb-serial, kmod-usb-serial-option, kmod-usb-net-cdc-ncm, kmod-usb-net-huawei-cdc-ncm, picocom, sqm-scripts, luci-app-sqm, kmod-ledtrig-heartbeat, htop

If the USB Device (HUAWEI E3372 LTE Stick) is left connected to the router during a reboot/boot, the hotplug event is triggered too early and the device has not yet all interfaces mapped in the /dev directory.
More specifically, my hotplug script wants to find the name of the interface (which is "ttyUSB0" in my case) by looking at the $DEVPATH directory, but during the hotplug script execution the link does not yet exist. Adding a "sleep" inside the script does not help, but executing a subscript via "exec script &" shows that after 3 seconds the link is created.
Attached is a file showing the directory listing of $DEVPATH during the hotplug event, and 3 seconds after the hotplug event.

Note that the hotplug script works as intended during actual hotplugging. This bug only presents itself during boot/reboot.
Also note that this was working on OpenWRT 15.05.1 (same Router, Stick and hotplug script)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant