Next part is Hotplug Buttons. First, I do this, it works. I can see the log print out when push/release button.
mkdir -p /etc/hotplug.d/button
cat << "EOF" > /etc/hotplug.d/button/buttons
logger "the button was ${BUTTON} and the action was ${ACTION}"
EOF
But, when I try to run following cmds to try. It did not work.
uci add system button
uci set system.@button[-1].button="config"
uci set system.@button[-1].action="pressed"
uci set system.@button[-1].handler="logger config pressed"
uci commit system
reload_config
Questions:
Hotplug Buttons still work on 19.07.4? If yes, which I'm wrong?
Which case we should use hotplug buttons? Looks like procd already cover all features hotplug buttons have.
Sorry for my poor English. Just simple question, how can I get following settings to work? Thanks.
uci add system button
uci set system.@button[-1].button="config"
uci set system.@button[-1].action="pressed"
uci set system.@button[-1].handler="logger config pressed"
uci commit system
Yes, your suggestions are working on my device. Thanks.
Mon Sep 28 08:39:21 2020 user.notice root: config of is pressed after 13 time
Mon Sep 28 08:39:23 2020 user.notice root: config of is released after 2 time