savebond.lua.svn-base

来自「嵌入式无线路由系统openwrt的web配置工具」· SVN-BASE 代码 · 共 30 行

SVN-BASE
30
字号
#!/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 + =
减小字号Ctrl + -
显示快捷键?