summaryrefslogtreecommitdiffhomepage
path: root/src/ffluci/controller
diff options
context:
space:
mode:
Diffstat (limited to 'src/ffluci/controller')
-rw-r--r--src/ffluci/controller/admin/index.lua2
-rw-r--r--src/ffluci/controller/admin/mesh.lua9
-rw-r--r--src/ffluci/controller/admin/network.lua4
-rw-r--r--src/ffluci/controller/admin/system.lua26
-rw-r--r--src/ffluci/controller/admin/uci.lua2
-rw-r--r--src/ffluci/controller/admin/wifi.lua10
6 files changed, 49 insertions, 4 deletions
diff --git a/src/ffluci/controller/admin/index.lua b/src/ffluci/controller/admin/index.lua
index 3ee564f640..d57e3fd9f4 100644
--- a/src/ffluci/controller/admin/index.lua
+++ b/src/ffluci/controller/admin/index.lua
@@ -1,4 +1,4 @@
-module(..., package.seeall)
+module("ffluci.controller.admin.index", package.seeall)
menu = {
descr = "Übersicht",
diff --git a/src/ffluci/controller/admin/mesh.lua b/src/ffluci/controller/admin/mesh.lua
new file mode 100644
index 0000000000..fcdcdabb04
--- /dev/null
+++ b/src/ffluci/controller/admin/mesh.lua
@@ -0,0 +1,9 @@
+module("ffluci.controller.admin.mesh", package.seeall)
+
+menu = {
+ descr = "Mesh",
+ order = 50,
+ entries = {
+ {action = "olsrd", descr = "OLSR"},
+ }
+} \ No newline at end of file
diff --git a/src/ffluci/controller/admin/network.lua b/src/ffluci/controller/admin/network.lua
index 2774dfdb02..534193b4db 100644
--- a/src/ffluci/controller/admin/network.lua
+++ b/src/ffluci/controller/admin/network.lua
@@ -2,9 +2,9 @@ module(..., package.seeall)
menu = {
descr = "Netzwerk",
- order = 20,
+ order = 30,
entries = {
- {action = "vlan", descr = "VLAN"},
+ {action = "vlan", descr = "Switch"},
{action = "ifaces", descr = "Schnittstellen"},
{action = "ptp", descr = "PPPoE / PPTP"},
}
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
diff --git a/src/ffluci/controller/admin/uci.lua b/src/ffluci/controller/admin/uci.lua
index a1eb0d7d72..9f8c124996 100644
--- a/src/ffluci/controller/admin/uci.lua
+++ b/src/ffluci/controller/admin/uci.lua
@@ -24,7 +24,7 @@ function action_apply()
for k, v in pairs(apply) do
local cmd = ffluci.config.uci_oncommit[k]
if cmd then
- output = output .. ffluci.util.exec(cmd)
+ output = output .. cmd .. ":" .. ffluci.util.exec(cmd)
end
end
end
diff --git a/src/ffluci/controller/admin/wifi.lua b/src/ffluci/controller/admin/wifi.lua
new file mode 100644
index 0000000000..54b6bfb203
--- /dev/null
+++ b/src/ffluci/controller/admin/wifi.lua
@@ -0,0 +1,10 @@
+module("ffluci.controller.admin.wifi", package.seeall)
+
+menu = {
+ descr = "Drahtlos",
+ order = 40,
+ entries = {
+ {action = "devices", descr = "Geräte"},
+ {action = "networks", descr = "Netze"},
+ }
+} \ No newline at end of file