save.lua.svn-base
来自「嵌入式无线路由系统openwrt的web配置工具」· SVN-BASE 代码 · 共 25 行
SVN-BASE
25 行
#!/usr/bin/lua-- Copyright (C) 2008 OpenRB.comrequire('fslib')tmpfile = os.getenv('FORM_uploadfile')pkgname = os.getenv('FORM_uploadfile_name')out = { done = 1} if (tmpfile ~= nil and pkgname ~= nil) then pkgfile = '/tmp/' .. pkgname r, error = os.rename(tmpfile, pkgfile) if (r == nil) then out.params = error else out.params = table.unique(readlines('opkg -force-defaults install ' .. pkgfile .. ' 2>&1', 0 , true)) os.remove(pkgfile) endendio.write(json.encode(out))
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?