[OpenWrt-Devel] procd button handling

John Crispin blogic at openwrt.org
Mon Jan 19 12:13:25 EST 2015



On 19/01/2015 18:05, beeronice wrote:
> 
> John Crispin <blogic at openwrt.org> wrote:
>> On 19/01/2015 16:54, Karl Palsson wrote:
>>> The wiki page for 
>>> http://wiki.openwrt.org/doc/howto/hardware.button refers to 
>>> https://dev.openwrt.org/changeset/37336 "procd: make old
>>> button hotplug rules work until all packages are migrated"
>>> 
>>> Which imply that procd took over hotplug buttons, and that
>>> there's a proper "way" that packages should "migrate" to a new
>>> form.  Is there any example of what this new form is?  Existing
>>> hotplug scripts are "just working" as is, but are they going to
>>> go away?
>>> 
>> 
>> have a look at /etc/rc.button/*
> 
> Ok, thanks, hadn't seen those.  Are these then syntactically the
> same as hotplug scripts?  Same environment variable names, just in 
> /etc/rc.button instead of /etc/hotplug.d/button ?  Is there any
> other change or new features that can be used?
> 

this is the json_script rule for the button handler ->

        [ "if",
                [ "and",
                        [ "has", "BUTTON" ],
                        [ "eq", "SUBSYSTEM", "button" ],
                ],
                [ "exec", "/etc/rc.button/%BUTTON%" ]
        ],

it will pass the same env to the script as it would to the hotplug
handler.


> 
> 
> _______________________________________________ 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