[OpenWrt-Devel] Using procd for USB hotplug detection

John Crispin john at phrozen.org
Sun Aug 30 00:15:41 EDT 2015


use block-mount that is what its there for.

On 29/08/2015 21:03, Alexandru Ardelean wrote:
> procd is for service handling mostly; so, start/stop/etc
> basically you'd need to have another service that does usb-device
> handling (of that device).
> 
> what i'd do, is to write a hotplug script, add it under /etc/hotplug.d
> and then call whatever needs to be called from that script
> it can be a ubus call to procd, or to some other service (ubus or not ubus)
> 
> 
> On Sat, Aug 29, 2015 at 9:20 PM, Lazar Demin <lazar at onion.io
> <mailto:lazar at onion.io>> wrote:
> 
>     Hi,
> 
>     I am trying to figure out how I can use procd to detect when a new usb
>     device comes up.
> 
>     The wiki (http://wiki.openwrt.org/doc/techref/procd) was pretty vague
>     on the proper usage of procd.
>     The procd init script wiki
>     (http://wiki.openwrt.org/inbox/procd-init-scripts) wasn't particularly
>     illuminating either and looks like its mostly geared towards whether
>     or not to restart the daemon based on if a configuration file (or
>     network interface) has changed.
> 
>     Is there a way to use procd to detect a new usb device in a similar
>     way to the hotplug deamon? Can somebody point me in the right
>     direction?
> 
>     I'm currently using fstab to automatically mount any usb-storage, but
>     ideally I would like to know the device name and type.
> 
> 
>     Much appreciated,
>     Lazar
>     _______________________________________________
>     openwrt-devel mailing list
>     openwrt-devel at lists.openwrt.org <mailto:openwrt-devel at lists.openwrt.org>
>     https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
> 
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list