save.lua.svn-base
来自「嵌入式无线路由系统openwrt的web配置工具」· SVN-BASE 代码 · 共 25 行
SVN-BASE
25 行
#!/usr/bin/lua-- Copyright (C) 2008 OpenRB.comrequire('fslib')data = datajson()-- check that data, values are passedif (data ~= nil and data['values'] ~= nil) then file = 'ntpclient' if (data['id'] == nil) then -- new entry, create id uci.init(file) data['id'] = uci.add(file, 'ntpclient') else -- editing existsing uci.init(file, data['id'], 'ntpclient') end for field, value in pairs(data['values']) do uci.setvalue(file, data['id'], field, value) end uci.commit(file)end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?