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#996 - At boot /etc/hotplug scripts are not triggered by kernel events #5941

openwrt-bot opened this issue Sep 2, 2017 · 2 comments


Copy link

@openwrt-bot openwrt-bot commented Sep 2, 2017


At boot /etc/hotplug.d scripts are not triggered by kernel events.
If we have a HDD/usb printer atached to an usb port, at boot, those scripts are not executed. However when we add/remove it later, after boot those scripts are executed properly.

Same problem as here:


I am using this hotplug script:

Copy link

@openwrt-bot openwrt-bot commented Oct 26, 2017



This is because in preinit the procd hotplug script are not executed. This is the config in preinit.;a=blob;f=package/system/procd/files/hotplug-preinit.json;h=58afc6c696ff546f0f5da20fb9fc131f1afbd77c;hb=444add156f2a6d92fc15005c5ade2208a978966c

If system is running then procd is started with this config,;a=blob;f=package/system/procd/files/hotplug.json;h=e5f8d967e8c16c8dc85a437a5259c0ba840d766c;hb=444add156f2a6d92fc15005c5ade2208a978966c

and then hotplug scripts are executed on kernel events.

So i think it is not a bug.

Copy link

@openwrt-bot openwrt-bot commented Feb 3, 2020


hotplug "coldplug" happens on early stage of booting, after preinit, but before modules are loaded. Maybe you need to get another hotplug event after the needed module was loaded. You might need to check other subsystem than hotplug.d/usb as hotplug.d/usbmisc or hotplug.d/block.

During early stage, you cannot use logger. You might need to debug your script echoing to a file: echo xxx >>/tmp/log.txt or to dmesg: echo xxx >>/dev/kmsg

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

No branches or pull requests

1 participant