+ if p1 == p2 then
+ stat = ffluci.sys.user.setpasswd("root", p1)
+ else
+ stat = 10
+ end
+ end
+
+ ffluci.template.render("admin_system/passwd", {stat=stat})
+end
+
+function action_reboot()
+ ffluci.template.render("admin_system/reboot")
+ ffluci.sys.reboot()
+end
+
+function action_sshkeys()
+ local file = "/etc/dropbear/authorized_keys"
+ local data = ffluci.http.formvalue("data")
+ local stat = nil
+ local err = nil
+
+ if data then
+ stat, err = ffluci.fs.writefile(file, data)
+ end
+
+ local cnt = ffluci.fs.readfile(file)
+ if cnt then
+ cnt = ffluci.util.pcdata(cnt)