On 19/07/22 08:56, Ravi Paluri (QUIC) wrote:
Hi all,
     We are trying to enable Hotplug functionality.
We've our device node under "/dev/<device-node>", which gets created at boot-up.
SUBSYSTEM of this <device-node> is "subsys". Hence, I created a folder named "subsys" 
under "/etc/hotplug.d/" and I added a script at this location as per detailed @ 
https://openwrt.org/docs/guide-user/base-system/hotplug#usagetroubleshooting

I also modified "/etc/hotplug.json" file with below code but script under 
"/etc/hotplug.d/subsys" is not getting executed, possibly since we are not getting 
SUBSYSTEM trigger event?

["if",
          [ "and",
                  [ "eq", "SUBSYSTEM", "subsys" ],
                  [ "isdir", "/etc/hotplug.d/subsys" ]
          ],
          [ "exec", "/sbin/hotplug-call", "subsys" ]
  ],

We've no clue why this trigger event is not getting fired.
Do we need to enable any kernel configuration flag? (We are using kernel 5.4 
version.) or any package needs to selected under openwrt menu etc.
Any pointers on how to enable hotplug will be very helpful.

Thanks,
Ravi


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Hi,

if it is /dev/subsys, then "subsys" is a devname and
I think you need to use

"eq", "DEVNAME", "subsys"

If you have /dev/subsys/item1, /dev/subsys/item2, /dev/subsys/item3 then
"subsys" is a folder and you can use

"isdir", "/dev/subsys"

-Alberto

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to