diff options
author | Steven Barth <steven@midlink.org> | 2008-03-28 22:55:27 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-03-28 22:55:27 +0000 |
commit | bd32a8aac5de9beb321b3cdfe180a8798c5a3379 (patch) | |
tree | a0b5e2926066e23c7356122a8afeb0ed0ef0e505 /src/ffluci/controller/admin/system.lua | |
parent | fb2a9a328d619ecf329e64cb500ff1385e3f8290 (diff) |
* CBI: improvements, bug fixes
* admin: Introduced wifi, olsr, password pages
Diffstat (limited to 'src/ffluci/controller/admin/system.lua')
-rw-r--r-- | src/ffluci/controller/admin/system.lua | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/ffluci/controller/admin/system.lua b/src/ffluci/controller/admin/system.lua new file mode 100644 index 0000000000..df2d981e4c --- /dev/null +++ b/src/ffluci/controller/admin/system.lua @@ -0,0 +1,26 @@ +module("ffluci.controller.admin.system", package.seeall) + +require("ffluci.util") +require("ffluci.http") + +menu = { + descr = "System", + order = 20, + entries = { + {action = "passwd", descr = "Passwort"}, + } +} + +function action_passwd() + local p1 = ffluci.http.formvalue("pwd1") + local p2 = ffluci.http.formvalue("pwd2") + local msg = nil + local cm + + if p1 or p2 then + cm = "(echo '"..p1.."';sleep 1;echo '"..p2.."') | passwd root 2>&1" + msg = ffluci.util.exec(cm) + end + + ffluci.template.render("admin_system/passwd", {msg=msg}) +end
\ No newline at end of file |