summaryrefslogtreecommitdiffhomepage
path: root/src/ffluci/model
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-04-11 18:13:58 +0000
committerSteven Barth <steven@midlink.org>2008-04-11 18:13:58 +0000
commitcd498aa924553422e64c4b56d2fb01e63a170bac (patch)
tree8dc47490dff680dc2c67a0c30e0bd64e1b34d008 /src/ffluci/model
parentb864e2933ddab6bb40868cd878c9b89f9073ad12 (diff)
* Major repository revision
Diffstat (limited to 'src/ffluci/model')
-rw-r--r--src/ffluci/model/cbi/admin_index/contact.lua15
-rw-r--r--src/ffluci/model/cbi/admin_index/luci.lua17
-rw-r--r--src/ffluci/model/cbi/admin_network/dhcp.lua37
-rw-r--r--src/ffluci/model/cbi/admin_network/firewall.lua61
-rw-r--r--src/ffluci/model/cbi/admin_network/ifaces.lua40
-rw-r--r--src/ffluci/model/cbi/admin_network/portfw.lua24
-rw-r--r--src/ffluci/model/cbi/admin_network/ptp.lua31
-rw-r--r--src/ffluci/model/cbi/admin_network/routes.lua16
-rw-r--r--src/ffluci/model/cbi/admin_network/vlan.lua10
-rw-r--r--src/ffluci/model/cbi/admin_services/dnsmasq.lua29
-rw-r--r--src/ffluci/model/cbi/admin_services/dropbear.lua14
-rw-r--r--src/ffluci/model/cbi/admin_services/httpd.lua18
-rw-r--r--src/ffluci/model/cbi/admin_services/olsrd.lua82
-rw-r--r--src/ffluci/model/cbi/admin_system/fstab.lua21
-rw-r--r--src/ffluci/model/cbi/admin_wifi/devices.lua52
-rw-r--r--src/ffluci/model/cbi/admin_wifi/networks.lua70
-rw-r--r--src/ffluci/model/ipkg.lua140
-rw-r--r--src/ffluci/model/menu/00main.lua38
-rw-r--r--src/ffluci/model/uci.lua202
19 files changed, 0 insertions, 917 deletions
diff --git a/src/ffluci/model/cbi/admin_index/contact.lua b/src/ffluci/model/cbi/admin_index/contact.lua
deleted file mode 100644
index 55f5098a55..0000000000
--- a/src/ffluci/model/cbi/admin_index/contact.lua
+++ /dev/null
@@ -1,15 +0,0 @@
-m = Map("luci", "Kontakt", [[Diese Daten sind auf der öffentlichen Kontaktseite
-sichtbar. Alle Felder sind natürlich freiwillig. Du kannst soviel oder so wenig
-über dich angeben, wie du möchtest.]])
-
-c = m:section(NamedSection, "contact")
-
-c:option(Value, "nickname", "Pseudonym")
-c:option(Value, "name", "Name")
-c:option(Value, "mail", "E-Mail")
-c:option(Value, "phone", "Telefon")
-c:option(Value, "location", "Standort")
-c:option(Value, "geo", "Koordinaten", "Bitte als Breite;Länge angeben")
-c:option(Value, "note", "Notiz")
-
-return m \ No newline at end of file
diff --git a/src/ffluci/model/cbi/admin_index/luci.lua b/src/ffluci/model/cbi/admin_index/luci.lua
deleted file mode 100644
index eed626c5b7..0000000000
--- a/src/ffluci/model/cbi/admin_index/luci.lua
+++ /dev/null
@@ -1,17 +0,0 @@
--- ToDo: Translate, Add descriptions and help texts
-m = Map("luci", "FFLuCI")
-
-c = m:section(NamedSection, "main", "core", "Allgemein")
-c:option(Value, "lang", "Sprache")
-c:option(Value, "mediaurlbase", "Mediaverzeichnis")
-
-f = m:section(NamedSection, "flash", "extern", "Firmwareupgrade")
-f:option(Value, "keep", "Übernehme Dateien").size = 64
-
-p = m:section(NamedSection, "category_privileges", "core", "Kategorieprivilegien")
-p.dynamic = true
-
-u = m:section(NamedSection, "uci_oncommit", "event", "UCI-Befehle beim Anwenden")
-u.dynamic = true
-
-return m \ No newline at end of file
diff --git a/src/ffluci/model/cbi/admin_network/dhcp.lua b/src/ffluci/model/cbi/admin_network/dhcp.lua
deleted file mode 100644
index 83ba196418..0000000000
--- a/src/ffluci/model/cbi/admin_network/dhcp.lua
+++ /dev/null
@@ -1,37 +0,0 @@
--- ToDo: Translate, Add descriptions and help texts
-require("ffluci.model.uci")
-require("ffluci.sys")
-
-m = Map("dhcp", "DHCP")
-
-s = m:section(TypedSection, "dhcp")
-s.addremove = true
-s.anonymous = true
-
-iface = s:option(ListValue, "interface", "Schnittstelle")
-for k, v in pairs(ffluci.model.uci.show("network").network) do
- if v[".type"] == "interface" and k ~= "loopback" then
- iface:value(k)
- end
-end
-
-s:option(Value, "start", "Start").rmempty = true
-
-s:option(Value, "limit", "Limit").rmempty = true
-
-s:option(Flag, "dynamicdhcp", "Dynamisches DHCP").rmempty = true
-
-s:option(Value, "name", "Name").optional = true
-
-s:option(Flag, "ignore", "Schnittstelle ignorieren").optional = true
-
-s:option(Value, "netmask", "Netzmaske").optional = true
-
-s:option(Flag, "force", "Start erzwingen").optional = true
-
-for i, line in pairs(ffluci.sys.execl("dnsmasq --help dhcp")) do
- k, v = line:match("([^ ]+) +([^ ]+)")
- s:option(Value, "dhcp"..k, v).optional = true
-end
-
-return m \ No newline at end of file
diff --git a/src/ffluci/model/cbi/admin_network/firewall.lua b/src/ffluci/model/cbi/admin_network/firewall.lua
deleted file mode 100644
index cf7018e996..0000000000
--- a/src/ffluci/model/cbi/admin_network/firewall.lua
+++ /dev/null
@@ -1,61 +0,0 @@
--- ToDo: Translate, Add descriptions and help texts
-m = Map("luci_fw", "Firewall")
-
-s = m:section(TypedSection, "rule")
-s.addremove = true
-s.anonymous = true
-
-chain = s:option(ListValue, "chain", "Kette")
-chain:value("forward", "Forward")
-chain:value("input", "Input")
-chain:value("output", "Output")
-chain:value("prerouting", "Prerouting")
-chain:value("postrouting", "Postrouting")
-
-s:option(Value, "iface", "Eingangsschnittstelle").optional = true
-s:option(Value, "oface", "Ausgangsschnittstelle").optional = true
-
-proto = s:option(ListValue, "proto", "Protokoll")
-proto.optional = true
-proto:value("")
-proto:value("tcp", "TCP")
-proto:value("udp", "UDP")
-
-s:option(Value, "source", "Quelladresse").optional = true
-s:option(Value, "destination", "Zieladresse").optional = true
-
-sport = s:option(Value, "sport", "Quellport")
-sport.optional = true
-sport:depends("proto", "tcp")
-sport:depends("proto", "udp")
-
-dport = s:option(Value, "dport", "Zielport")
-dport.optional = true
-dport:depends("proto", "tcp")
-dport:depends("proto", "udp")
-
-tosrc = s:option(Value, "tosrc", "Neue Quelladresse [SNAT]")
-tosrc.optional = true
-tosrc:depends("jump", "SNAT")
-
-tosrc = s:option(Value, "todest", "Neue Zieladresse [DNAT]")
-tosrc.optional = true
-tosrc:depends("jump", "DNAT")
-
-jump = s:option(ListValue, "jump", "Aktion")
-jump.rmempty = true
-jump:value("", "")
-jump:value("ACCEPT", "annehmen (ACCEPT)")
-jump:value("REJECT", "zurückweisen (REJECT)")
-jump:value("DROP", "verwerfen (DROP)")
-jump:value("LOG", "protokollieren (LOG)")
-jump:value("DNAT", "Ziel umschreiben (DNAT) [nur Prerouting]")
-jump:value("MASQUERADE", "maskieren (MASQUERADE) [nur Postrouting]")
-jump:value("SNAT", "Quelle umschreiben (SNAT) [nur Postrouting]")
-
-
-add = s:option(Value, "command", "Eigener Befehl")
-add.size = 50
-add.rmempty = true
-
-return m
diff --git a/src/ffluci/model/cbi/admin_network/ifaces.lua b/src/ffluci/model/cbi/admin_network/ifaces.lua
deleted file mode 100644
index 193f83f514..0000000000
--- a/src/ffluci/model/cbi/admin_network/ifaces.lua
+++ /dev/null
@@ -1,40 +0,0 @@
--- ToDo: Translate, Add descriptions and help texts
-m = Map("network", "Schnittstellen")
-
-s = m:section(TypedSection, "interface")
-s.addremove = true
-s:exclude("loopback")
-s:depends("proto", "static")
-s:depends("proto", "dhcp")
-
-p = s:option(ListValue, "proto", "Protokoll")
-p:value("static", "statisch")
-p:value("dhcp", "DHCP")
-p.default = "static"
-
-br = s:option(Flag, "type", "Netzwerkbrücke", "überbrückt angegebene Schnittstelle(n)")
-br.enabled = "bridge"
-br.rmempty = true
-
-s:option(Value, "ifname", "Schnittstelle")
-
-s:option(Value, "ipaddr", "IP-Adresse")
-
-s:option(Value, "netmask", "Netzmaske"):depends("proto", "static")
-
-gw = s:option(Value, "gateway", "Gateway")
-gw:depends("proto", "static")
-gw.rmempty = true
-
-dns = s:option(Value, "dns", "DNS-Server")
-dns:depends("proto", "static")
-dns.optional = true
-
-mtu = s:option(Value, "mtu", "MTU")
-mtu.optional = true
-mtu.isinteger = true
-
-mac = s:option(Value, "macaddr", "MAC-Adresse")
-mac.optional = true
-
-return m \ No newline at end of file
diff --git a/src/ffluci/model/cbi/admin_network/portfw.lua b/src/ffluci/model/cbi/admin_network/portfw.lua
deleted file mode 100644
index 70a174907f..0000000000
--- a/src/ffluci/model/cbi/admin_network/portfw.lua
+++ /dev/null
@@ -1,24 +0,0 @@
--- ToDo: Translate, Add descriptions and help texts
-require("ffluci.sys")
-m = Map("luci_fw", "Portweiterleitung")
-
-s = m:section(TypedSection, "portfw")
-s.addremove = true
-s.anonymous = true
-
-iface = s:option(ListValue, "iface", "Externes Interface")
-iface:value("")
-for k,v in pairs(ffluci.sys.net.devices()) do
- iface:value(v)
-end
-
-proto = s:option(ListValue, "proto", "Protokoll")
-proto:value("tcp", "TCP")
-proto:value("udp", "UDP")
-proto:value("tcpudp", "TCP+UDP")
-
-dport = s:option(Value, "dport", "Externer Port", "Port[:Endport]")
-
-to = s:option(Value, "to", "Interne Adresse", "IP-Adresse[:Zielport[-Zielendport]]")
-
-return m
diff --git a/src/ffluci/model/cbi/admin_network/ptp.lua b/src/ffluci/model/cbi/admin_network/ptp.lua
deleted file mode 100644
index 78fcf94b9e..0000000000
--- a/src/ffluci/model/cbi/admin_network/ptp.lua
+++ /dev/null
@@ -1,31 +0,0 @@
--- ToDo: Translate, Add descriptions and help texts
-m = Map("network", "Punkt-zu-Punkt Verbindungen")
-
-s = m:section(TypedSection, "interface")
-s.addremove = true
-s:depends("proto", "pppoe")
-s:depends("proto", "pptp")
-
-p = s:option(ListValue, "proto", "Protokoll")
-p:value("pppoe", "PPPoE")
-p:value("pptp", "PPTP")
-p.default = "pppoe"
-
-s:option(Value, "ifname", "Schnittstelle")
-
-s:option(Value, "username", "Benutzername")
-s:option(Value, "password", "Passwort")
-
-s:option(Value, "keepalive", "Keep-Alive").optional = true
-
-s:option(Value, "demand", "Dial on Demand (idle time)").optional = true
-
-srv = s:option(Value, "server", "PPTP-Server")
-srv:depends("proto", "pptp")
-srv.optional = true
-
-mtu = s:option(Value, "mtu", "MTU")
-mtu.optional = true
-mtu.isinteger = true
-
-return m \ No newline at end of file
diff --git a/src/ffluci/model/cbi/admin_network/routes.lua b/src/ffluci/model/cbi/admin_network/routes.lua
deleted file mode 100644
index 5a5f780070..0000000000
--- a/src/ffluci/model/cbi/admin_network/routes.lua
+++ /dev/null
@@ -1,16 +0,0 @@
--- ToDo: Translate, Add descriptions and help texts
-m = Map("network", "Statische Routen")
-
-s = m:section(TypedSection, "route")
-s.addremove = true
-s.anonymous = true
-
-s:option(Value, "interface", "Schnittstelle")
-
-s:option(Value, "target", "Ziel", "Host-IP oder Netzwerk")
-
-s:option(Value, "netmask", "Netzmaske", "falls Ziel ein Netzwerk ist").rmemepty = true
-
-s:option(Value, "gateway", "Gateway")
-
-return m \ No newline at end of file
diff --git a/src/ffluci/model/cbi/admin_network/vlan.lua b/src/ffluci/model/cbi/admin_network/vlan.lua
deleted file mode 100644
index 3186f2d9bb..0000000000
--- a/src/ffluci/model/cbi/admin_network/vlan.lua
+++ /dev/null
@@ -1,10 +0,0 @@
--- ToDo: Autodetect things, maybe use MultiValue instead, Translate, Add descriptions
-m = Map("network", "VLAN", "Konfguriert den Switch des Routers.")
-
-s = m:section(TypedSection, "switch")
-
-for i = 0, 15 do
- s:option(Value, "vlan"..i, "vlan"..i).optional = true
-end
-
-return m \ No newline at end of file
diff --git a/src/ffluci/model/cbi/admin_services/dnsmasq.lua b/src/ffluci/model/cbi/admin_services/dnsmasq.lua
deleted file mode 100644
index d6934c891c..0000000000
--- a/src/ffluci/model/cbi/admin_services/dnsmasq.lua
+++ /dev/null
@@ -1,29 +0,0 @@
-m = Map("dhcp", "Dnsmasq")
-
-s = m:section(TypedSection, "dnsmasq", "Einstellungen")
-s.anonymous = true
-
-s:option(Flag, "domainneeded", "Anfragen nur mit Domain", "Anfragen ohne Domainnamen nicht weiterleiten")
-s:option(Flag, "authoritative", "Authoritativ", "Dies ist der einzige DHCP im lokalen Netz")
-s:option(Flag, "boguspriv", "Private Anfragen filtern", "Reverse DNS-Anfragen für lokalen Netze nicht weiterleiten")
-s:option(Flag, "filterwin2k", "Windowsanfragen filtern", "nutzlose DNS-Anfragen aktueller Windowssysteme filtern")
-s:option(Flag, "localise_queries", "Lokalisiere Anfragen", "Gibt die Adresse eines Hostnamen entsprechend seines Subnetzes zurück")
-s:option(Value, "local", "Lokale Server")
-s:option(Value, "domain", "Lokale Domain")
-s:option(Flag, "expandhosts", "Erweitere Hosts", "Fügt Domainnamen zu einfachen Hosteinträgen in der Resolvdatei hinzu")
-s:option(Flag, "nonegcache", "Unbekannte nicht cachen", "Negative DNS-Antworten nicht zwischenspeichern")
-s:option(Flag, "readethers", "Verwende /etc/ethers", "Lese Informationen aus /etc/ethers um den DHCP-Server zu konfigurieren")
-s:option(Value, "leasefile", "Leasedatei", "Speicherort für vergebenen DHCP-Adressen")
-s:option(Value, "resolvfile", "Resolvdatei", "Lokale DNS-Datei")
-s:option(Flag, "nohosts", "Ignoriere /etc/hosts").optional = true
-s:option(Flag, "strictorder", "Strikte Reihenfolge", "DNS-Server werden strikt der Reihenfolge in der Resolvdatei nach abgefragt").optional = true
-s:option(Flag, "logqueries", "Schreibe Abfragelog").optional = true
-s:option(Flag, "noresolv", "Ignoriere Resolvdatei").optional = true
-s:option(Value, "dnsforwardmax", "gleichzeitige Abfragen").optional = true
-s:option(Value, "port", "DNS-Port").optional = true
-s:option(Value, "ednspacket_max", "max. EDNS.0 Paketgröße").optional = true
-s:option(Value, "dhcpleasemax", "max. DHCP-Leases").optional = true
-s:option(Value, "addnhosts", "Zusätzliche Hostdatei").optional = true
-s:option(Value, "queryport", "Abfrageport").optional = true
-
-return m \ No newline at end of file
diff --git a/src/ffluci/model/cbi/admin_services/dropbear.lua b/src/ffluci/model/cbi/admin_services/dropbear.lua
deleted file mode 100644
index b8fcb9e6b2..0000000000
--- a/src/ffluci/model/cbi/admin_services/dropbear.lua
+++ /dev/null
@@ -1,14 +0,0 @@
--- ToDo: Translate, Add descriptions
-m = Map("dropbear", "SSH-Server")
-
-s = m:section(TypedSection, "dropbear")
-s.anonymous = true
-
-port = s:option(Value, "Port", "Port")
-port.isinteger = true
-
-pwauth = s:option(Flag, "PasswordAuth", "Passwortanmeldung")
-pwauth.enabled = 'on'
-pwauth.disabled = 'off'
-
-return m \ No newline at end of file
diff --git a/src/ffluci/model/cbi/admin_services/httpd.lua b/src/ffluci/model/cbi/admin_services/httpd.lua
deleted file mode 100644
index f89dbb7aeb..0000000000
--- a/src/ffluci/model/cbi/admin_services/httpd.lua
+++ /dev/null
@@ -1,18 +0,0 @@
--- ToDo: Translate, Add descriptions
-m = Map("httpd", "HTTP-Server")
-
-s = m:section(TypedSection, "httpd")
-s.anonymous = true
-
-port = s:option(Value, "port", "Port")
-port.isinteger = true
-
-s:option(Value, "home", "Wurzelverzeichnis")
-
-config = s:option(Value, "c_file", "Konfigurationsdatei", "/etc/httpd.conf wenn leer")
-config.rmempty = true
-
-realm = s:option(Value, "realm", "Anmeldeaufforderung")
-realm.rmempty = true
-
-return m \ No newline at end of file
diff --git a/src/ffluci/model/cbi/admin_services/olsrd.lua b/src/ffluci/model/cbi/admin_services/olsrd.lua
deleted file mode 100644
index 430b786874..0000000000
--- a/src/ffluci/model/cbi/admin_services/olsrd.lua
+++ /dev/null
@@ -1,82 +0,0 @@
--- ToDo: Autodetect things, Translate, Add descriptions
-require("ffluci.fs")
-
-m = Map("olsr", "OLSR")
-
-s = m:section(NamedSection, "general", "olsr", "Allgemeine Einstellungen")
-
-debug = s:option(ListValue, "DebugLevel", "Debugmodus")
-for i=0, 9 do
- debug:value(i)
-end
-
-ipv = s:option(ListValue, "IpVersion", "Internet Protokoll")
-ipv:value("4", "IPv4")
-ipv:value("6", "IPv6")
-
-noint = s:option(Flag, "AllowNoInt", "Start ohne Netzwerk")
-noint.enabled = "yes"
-noint.disabled = "no"
-
-s:option(Value, "Pollrate", "Abfragerate (Pollrate)", "s").isnumber = true
-
-tcr = s:option(ListValue, "TcRedundancy", "TC-Redundanz")
-tcr:value("0", "MPR-Selektoren")
-tcr:value("1", "MPR-Selektoren und MPR")
-tcr:value("2", "Alle Nachbarn")
-
-s:option(Value, "MprCoverage", "MPR-Erfassung").isinteger = true
-
-lql = s:option(ListValue, "LinkQualityLevel", "VQ-Level")
-lql:value("0", "deaktiviert")
-lql:value("1", "MPR-Auswahl")
-lql:value("2", "MPR-Auswahl und Routing")
-
-lqfish = s:option(Flag, "LinkQualityFishEye", "VQ-Fisheye")
-
-s:option(Value, "LinkQualityWinSize", "VQ-Fenstergröße").isinteger = true
-
-s:option(Value, "LinkQualityDijkstraLimit", "VQ-Dijkstralimit")
-
-hyst = s:option(Flag, "UseHysteresis", "Hysterese aktivieren")
-hyst.enabled = "yes"
-hyst.disabled = "no"
-
-
-i = m:section(TypedSection, "Interface", "Schnittstellen")
-i.anonymous = true
-i.addremove = true
-i.dynamic = true
-
-i:option(Value, "Interface", "Netzwerkschnittstellen")
-
-i:option(Value, "HelloInterval", "Hello-Intervall").isnumber = true
-
-i:option(Value, "HelloValidityTime", "Hello-Gültigkeit").isnumber = true
-
-i:option(Value, "TcInterval", "TC-Intervall").isnumber = true
-
-i:option(Value, "TcValidityTime", "TC-Gültigkeit").isnumber = true
-
-i:option(Value, "MidInterval", "MID-Intervall").isnumber = true
-
-i:option(Value, "MidValidityTime", "MID-Gültigkeit").isnumber = true
-
-i:option(Value, "HnaInterval", "HNA-Intervall").isnumber = true
-
-i:option(Value, "HnaValidityTime", "HNA-Gültigkeit").isnumber = true
-
-
-p = m:section(TypedSection, "LoadPlugin", "Plugins")
-p.addremove = true
-p.dynamic = true
-
-lib = p:option(ListValue, "Library", "Bibliothek")
-lib:value("")
-for k, v in pairs(ffluci.fs.dir("/usr/lib")) do
- if v:sub(1, 6) == "olsrd_" then
- lib:value(v)
- end
-end
-
-return m \ No newline at end of file
diff --git a/src/ffluci/model/cbi/admin_system/fstab.lua b/src/ffluci/model/cbi/admin_system/fstab.lua
deleted file mode 100644
index cf9a483d78..0000000000
--- a/src/ffluci/model/cbi/admin_system/fstab.lua
+++ /dev/null
@@ -1,21 +0,0 @@
-m = Map("fstab", "Einhängepunkte")
-
-mount = m:section(TypedSection, "mount", "Einhängepunkte")
-mount.anonymous = true
-mount.addremove = true
-
-mount:option(Flag, "enabled", "aktivieren")
-mount:option(Value, "device", "Gerät")
-mount:option(Value, "target", "Einhängepunkt")
-mount:option(Value, "fstype", "Dateisystem")
-mount:option(Value, "options", "Optionen")
-
-
-swap = m:section(TypedSection, "swap", "SWAP")
-swap.anonymous = true
-swap.addremove = true
-
-swap:option(Flag, "enabled", "aktivieren")
-swap:option(Value, "device", "Gerät")
-
-return m
diff --git a/src/ffluci/model/cbi/admin_wifi/devices.lua b/src/ffluci/model/cbi/admin_wifi/devices.lua
deleted file mode 100644
index 0b1b9a2ffe..0000000000
--- a/src/ffluci/model/cbi/admin_wifi/devices.lua
+++ /dev/null
@@ -1,52 +0,0 @@
--- ToDo: Translate, Add descriptions and help texts
-
-m = Map("wireless", "Geräte")
-
-s = m:section(TypedSection, "wifi-device")
---s.addremove = true
-
-en = s:option(Flag, "disabled", "Aktivieren")
-en.enabled = "0"
-en.disabled = "1"
-
-t = s:option(ListValue, "type", "Typ")
-t:value("broadcom")
-t:value("atheros")
-t:value("mac80211")
-t:value("prism2")
---[[
-require("ffluci.sys")
-local c = ". /etc/functions.sh;for i in /lib/wifi/*;do . $i;done;echo $DRIVERS"
-for driver in ffluci.sys.execl(c)[1]:gmatch("[^ ]+") do
- t:value(driver)
-end
-]]--
-
-mode = s:option(ListValue, "mode", "Modus")
-mode:value("", "standard")
-mode:value("11b", "802.11b")
-mode:value("11g", "802.11g")
-mode:value("11a", "802.11a")
-mode:value("11bg", "802.11b+g")
-mode.rmempty = true
-
-s:option(Value, "channel", "Funkkanal")
-
-s:option(Value, "txantenna", "Sendeantenne").rmempty = true
-
-s:option(Value, "rxantenna", "Empfangsantenne").rmempty = true
-
-s:option(Value, "distance", "Distanz",
- "Distanz zum am weitesten entfernten Funkpartner (m)").rmempty = true
-
-s:option(Value, "diversity", "Diversität"):depends("type", "atheros")
-
-country = s:option(Value, "country", "Ländercode")
-country.optional = true
-country:depends("type", "broadcom")
-
-maxassoc = s:option(Value, "maxassoc", "Verbindungslimit")
-maxassoc:depends("type", "broadcom")
-maxassoc.optional = true
-
-return m \ No newline at end of file
diff --git a/src/ffluci/model/cbi/admin_wifi/networks.lua b/src/ffluci/model/cbi/admin_wifi/networks.lua
deleted file mode 100644
index 20342ffb03..0000000000
--- a/src/ffluci/model/cbi/admin_wifi/networks.lua
+++ /dev/null
@@ -1,70 +0,0 @@
--- ToDo: Translate, Add descriptions and help texts
-m = Map("wireless", "Netze")
-
-s = m:section(TypedSection, "wifi-iface")
-s.addremove = true
-s.anonymous = true
-
-s:option(Value, "ssid", "Netzkennung (ESSID)").maxlength = 32
-
-device = s:option(ListValue, "device", "Gerät")
-local d = ffluci.model.uci.show("wireless").wireless
-if d then
- for k, v in pairs(d) do
- if v[".type"] == "wifi-device" then
- device:value(k)
- end
- end
-end
-
-network = s:option(ListValue, "network", "Netzwerk")
-network:value("")
-for k, v in pairs(ffluci.model.uci.show("network").network) do
- if v[".type"] == "interface" and k ~= "loopback" then
- network:value(k)
- end
-end
-
-mode = s:option(ListValue, "mode", "Modus")
-mode:value("ap", "Access Point")
-mode:value("adhoc", "Ad-Hoc")
-mode:value("sta", "Client")
-mode:value("wds", "WDS")
-
-s:option(Value, "bssid", "BSSID").optional = true
-
-s:option(Value, "txpower", "Sendeleistung", "dbm").rmempty = true
-
-encr = s:option(ListValue, "encryption", "Verschlüsselung")
-encr:value("none", "keine")
-encr:value("wep", "WEP")
-encr:value("psk", "WPA-PSK")
-encr:value("wpa", "WPA-Radius")
-encr:value("psk2", "WPA2-PSK")
-encr:value("wpa2", "WPA2-Radius")
-
-key = s:option(Value, "key", "Schlüssel")
-key:depends("encryption", "wep")
-key:depends("encryption", "psk")
-key:depends("encryption", "wpa")
-key:depends("encryption", "psk2")
-key:depends("encryption", "wpa2")
-key.rmempty = true
-
-server = s:option(Value, "server", "Radius-Server")
-server:depends("encryption", "wpa")
-server:depends("encryption", "wpa2")
-server.rmempty = true
-
-port = s:option(Value, "port", "Radius-Port")
-port:depends("encryption", "wpa")
-port:depends("encryption", "wpa2")
-port.rmempty = true
-
-s:option(Flag, "isolate", "AP-Isolation", "Unterbindet Client-Client-Verkehr").optional = true
-
-s:option(Flag, "hidden", "ESSID verstecken").optional = true
-
-
-
-return m \ No newline at end of file
diff --git a/src/ffluci/model/ipkg.lua b/src/ffluci/model/ipkg.lua
deleted file mode 100644
index 3b149fb168..0000000000
--- a/src/ffluci/model/ipkg.lua
+++ /dev/null
@@ -1,140 +0,0 @@
---[[
-FFLuCI - IPKG wrapper library
-
-Description:
-Wrapper for the ipkg Package manager
-
-Any return value of false or nil can be interpreted as an error
-
-FileId:
-$Id$
-
-License:
-Copyright 2008 Steven Barth <steven@midlink.org>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-]]--
-module("ffluci.model.ipkg", package.seeall)
-require("ffluci.sys")
-require("ffluci.util")
-
-ipkg = "ipkg"
-
--- Returns repository information
-function info(pkg)
- return _lookup("info", pkg)
-end
-
--- Returns a table with status information
-function status(pkg)
- return _lookup("status", pkg)
-end
-
--- Installs packages
-function install(...)
- return _action("install", ...)
-end
-
--- Returns whether a package is installed
-function installed(pkg, ...)
- local p = status(...)[pkg]
- return (p and p.Status and p.Status.installed)
-end
-
--- Removes packages
-function remove(...)
- return _action("remove", ...)
-end
-
--- Updates package lists
-function update()
- return _action("update")
-end
-
--- Upgrades installed packages
-function upgrade()
- return _action("upgrade")
-end
-
-
--- Internal action function
-function _action(cmd, ...)
- local pkg = ""
- arg.n = nil
- for k, v in pairs(arg) do
- pkg = pkg .. " '" .. v:gsub("'", "") .. "'"
- end
-
- local c = ipkg.." "..cmd.." "..pkg.." >/dev/null 2>&1"
- local r = os.execute(c)
- return (r == 0), r
-end
-
--- Internal lookup function
-function _lookup(act, pkg)
- local cmd = ipkg .. " " .. act
- if pkg then
- cmd = cmd .. " '" .. pkg:gsub("'", "") .. "'"
- end
-
- return _parselist(ffluci.sys.exec(cmd .. " 2>/dev/null"))
-end
-
--- Internal parser function
-function _parselist(rawdata)
- if type(rawdata) ~= "string" then
- error("IPKG: Invalid rawdata given")
- end
-
- rawdata = ffluci.util.split(rawdata)
- local data = {}
- local c = {}
- local l = nil
-
- for k, line in pairs(rawdata) do
- if line:sub(1, 1) ~= " " then
- local split = ffluci.util.split(line, ":", 1)
- local key = nil
- local val = nil
-
- if split[1] then
- key = ffluci.util.trim(split[1])
- end
-
- if split[2] then
- val = ffluci.util.trim(split[2])
- end
-
- if key and val then
- if key == "Package" then
- c = {Package = val}
- data[val] = c
- elseif key == "Status" then
- c.Status = {}
- for i, j in pairs(ffluci.util.split(val, " ")) do
- c.Status[j] = true
- end
- else
- c[key] = val
- end
- l = key
- end
- else
- -- Multi-line field
- c[l] = c[l] .. "\n" .. line:sub(2)
- end
- end
-
- return data
-end \ No newline at end of file
diff --git a/src/ffluci/model/menu/00main.lua b/src/ffluci/model/menu/00main.lua
deleted file mode 100644
index 09c5dbf0de..0000000000
--- a/src/ffluci/model/menu/00main.lua
+++ /dev/null
@@ -1,38 +0,0 @@
--- General menu definition
-add("public", "index", "Übersicht", 10)
-act("contact", "Kontakt")
-
-
-add("admin", "index", "Übersicht", 10)
-act("contact", "Kontakt")
-act("luci", "FFLuCI")
-
-add("admin", "status", "Status", 20)
-act("system", "System")
-
-add("admin", "system", "System", 30)
-act("packages", "Paketverwaltung")
-act("passwd", "Passwort ändern")
-act("sshkeys", "SSH-Schlüssel")
-act("fstab", "Einhängepunkte")
-act("upgrade", "Firmwareupgrade")
-act("reboot", "Neu starten")
-
-add("admin", "services", "Dienste", 40)
-act("olsrd", "OLSR")
-act("httpd", "HTTP-Server")
-act("dropbear", "SSH-Server")
-act("dnsmasq", "Dnsmasq")
-
-add("admin", "network", "Netzwerk", 50)
-act("vlan", "Switch")
-act("ifaces", "Schnittstellen")
-act("dhcp", "DHCP-Server")
-act("ptp", "PPPoE / PPTP")
-act("routes", "Statische Routen")
-act("portfw", "Portweiterleitung")
-act("firewall", "Firewall")
-
-add("admin", "wifi", "Drahtlos", 60)
-act("devices", "Geräte")
-act("networks", "Netze") \ No newline at end of file
diff --git a/src/ffluci/model/uci.lua b/src/ffluci/model/uci.lua
deleted file mode 100644
index 8286597807..0000000000
--- a/src/ffluci/model/uci.lua
+++ /dev/null
@@ -1,202 +0,0 @@
---[[
-FFLuCI - UCI wrapper library
-
-Description:
-Wrapper for the /sbin/uci application, syntax of implemented functions
-is comparable to the syntax of the uci application
-
-Any return value of false or nil can be interpreted as an error
-
-
-ToDo: Reimplement in Lua
-
-FileId:
-$Id$
-
-License:
-Copyright 2008 Steven Barth <steven@midlink.org>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-]]--
-module("ffluci.model.uci", package.seeall)
-require("ffluci.util")
-require("ffluci.fs")
-require("ffluci.sys")
-
--- The OS uci command
-ucicmd = "uci"
-
--- Session class
-Session = ffluci.util.class()
-
--- Session constructor
-function Session.__init__(self, path, uci)
- uci = uci or ucicmd
- if path then
- self.ucicmd = uci .. " -P " .. path
- else
- self.ucicmd = uci
- end
-end
-
--- The default Session
-local default = Session()
-
--- Wrapper for "uci add"
-function Session.add(self, config, section_type)
- return self:_uci("add " .. _path(config) .. " " .. _path(section_type))
-end
-
-function add(...)
- return default:add(...)
-end
-
-
--- Wrapper for "uci changes"
-function Session.changes(self, config)
- return self:_uci("changes " .. _path(config))
-end
-
-function changes(...)
- return default:changes(...)
-end
-
-
--- Wrapper for "uci commit"
-function Session.commit(self, config)
- return self:_uci2("commit " .. _path(config))
-end
-
-function commit(...)
- return default:commit(...)
-end
-
-
--- Wrapper for "uci del"
-function Session.del(self, config, section, option)
- return self:_uci2("del " .. _path(config, section, option))
-end
-
-function del(...)
- return default:del(...)
-end
-
-
--- Wrapper for "uci get"
-function Session.get(self, config, section, option)
- return self:_uci("get " .. _path(config, section, option))
-end
-
-function get(...)
- return default:get(...)
-end
-
-
--- Wrapper for "uci revert"
-function Session.revert(self, config)
- return self:_uci2("revert " .. _path(config))
-end
-
-function revert(...)
- return default:revert(...)
-end
-
-
--- Wrapper for "uci show"
-function Session.show(self, config)
- return self:_uci3("show " .. _path(config))
-end
-
-function show(...)
- return default:show(...)
-end
-
-
--- Wrapper for "uci set"
-function Session.set(self, config, section, option, value)
- return self:_uci2("set " .. _path(config, section, option, value))
-end
-
-function set(...)
- return default:set(...)
-end
-
-
--- Internal functions --
-
-function Session._uci(self, cmd)
- local res = ffluci.sys.exec(self.ucicmd .. " 2>/dev/null " .. cmd)
-
- if res:len() == 0 then
- return nil
- else
- return res:sub(1, res:len()-1)
- end
-end
-
-function Session._uci2(self, cmd)
- local res = ffluci.sys.exec(self.ucicmd .. " 2>&1 " .. cmd)
-
- if res:len() > 0 then
- return false, res
- else
- return true
- end
-end
-
-function Session._uci3(self, cmd)
- local res = ffluci.sys.execl(self.ucicmd .. " 2>&1 " .. cmd)
- if res[1] and res[1]:sub(1, self.ucicmd:len()+1) == self.ucicmd..":" then
- return nil, res[1]
- end
-
- table = {}
-
- for k,line in pairs(res) do
- c, s, t = line:match("^([^.]-)%.([^.]-)=(.-)$")
- if c then
- table[c] = table[c] or {}
- table[c][s] = {}
- table[c][s][".type"] = t
- end
-
- c, s, o, v = line:match("^([^.]-)%.([^.]-)%.([^.]-)=(.-)$")
- if c then
- table[c][s][o] = v
- end
- end
-
- return table
-end
-
--- Build path (config.section.option=value) and prevent command injection
-function _path(...)
- local result = ""
-
- -- Not using ipairs because it is not reliable in case of nil arguments
- arg.n = nil
- for k,v in pairs(arg) do
- if v then
- v = tostring(v)
- if k == 1 then
- result = "'" .. v:gsub("['.]", "") .. "'"
- elseif k < 4 then
- result = result .. ".'" .. v:gsub("['.]", "") .. "'"
- elseif k == 4 then
- result = result .. "='" .. v:gsub("'", "") .. "'"
- end
- end
- end
- return result
-end \ No newline at end of file