* Replaced luafilesystem with luaposix library
[project/luci.git] / src / ffluci / controller / admin / system.lua
1 module("ffluci.controller.admin.system", package.seeall)
2
3 require("ffluci.sys")
4 require("ffluci.http")
5
6 menu = {
7         descr   = "System",
8         order   = 20,
9         entries = {
10                 {action = "passwd", descr = "Passwort"},
11         }
12 }
13
14 function action_passwd()
15         local p1 = ffluci.http.formvalue("pwd1")
16         local p2 = ffluci.http.formvalue("pwd2")
17         local msg = nil
18         local cm
19         
20         if p1 or p2 then
21                 msg = ffluci.sys.user.setpasswd("root", p1, p2)
22         end
23         
24         ffluci.template.render("admin_system/passwd", {msg=msg})
25 end