📄 savebond.lua.svn-base
字号:
#!/usr/bin/lua-- Copyright (C) 2008 OpenRB.comrequire('fslib')data = datajson() or {}if data['id'] and data['values'] then cfgName = data['id'] uci.init('bonding', cfgName, 'interface') iflist = {} for field, value in pairs(data['values']) do if (field:find('^if_') and value ~= '') then table.insert(iflist, value) else uci.setvalue('bonding', cfgName, field, value) end end ifnames = table.concat(iflist, ' ') if #iflist == 0 then uci.set('bonding', cfgName, 'enabled', '0') end uci.setvalue('bonding', cfgName, 'ifname', ifnames) uci.commit('bonding')end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -