Modify

Opened 3 years ago

Last modified 3 years ago

#19096 new defect

LuCI does not show buttons.lua, but code is there

Reported by: nilfred@… Owned by:
Priority: normal Milestone: Chaos Calmer 15.05
Component: luci Version: Trunk
Keywords: buttons GPIO keys Cc:

Description

I found a report from 2012:
https://forum.openwrt.org/viewtopic.php?pid=182193#p182193
Where is also a patchset.

In a running system:

opkg list-installed base-files
base-files - 157-r44154
find / -name buttons.lua
/rom/usr/lib/lua/luci/model/cbi/admin_system/buttons.lua
/usr/lib/lua/luci/model/cbi/admin_system/buttons.lua
tail -2 /usr/lib/lua/luci/model/cbi/admin_system/buttons.lua
max = s:option(Value, "max", translate("Maximum hold time"))
max.rmempty = true
echo "return m" >> /usr/lib/lua/luci/model/cbi/admin_system/buttons.lua

Attachments (0)

Change History (1)

comment:1 Changed 3 years ago by nilfred@…

Oops! Part of the workaround slipped in the bug description. Anyway, this is the full workaround in a running system:

echo "return m" >> /usr/lib/lua/luci/model/cbi/admin_system/buttons.lua
sed -i -e '/Flash F/ i\
<damm-tab>entry({"admin", "system", "buttons"}, cbi("admin_system/buttons"), _("Buttons"), 65)\

' /usr/lib/lua/luci/controller/admin/system.lua
sed -i -e "s/<damm-tab>/\t/" /usr/lib/lua/luci/controller/admin/system.lua

That's all, now you should have http://192.168.1.1/cgi-bin/luci/admin/system/buttons under System menu.

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.