summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-base/luasrc/sys.lua18
-rw-r--r--modules/luci-base/po/ru/base.po4
-rw-r--r--modules/luci-base/po/tr/base.po161
-rw-r--r--modules/luci-mod-admin-full/luasrc/controller/admin/system.lua18
-rw-r--r--modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/ifaces.lua2
-rw-r--r--modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/vlan.lua2
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm20
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm34
8 files changed, 169 insertions, 90 deletions
diff --git a/modules/luci-base/luasrc/sys.lua b/modules/luci-base/luasrc/sys.lua
index 823e20770c..1436a3a235 100644
--- a/modules/luci-base/luasrc/sys.lua
+++ b/modules/luci-base/luasrc/sys.lua
@@ -70,6 +70,24 @@ function mounts()
return data
end
+function mtds()
+ local data = {}
+
+ if fs.access("/proc/mtd") then
+ for l in io.lines("/proc/mtd") do
+ local d, s, e, n = l:match('^([^%s]+)%s+([^%s]+)%s+([^%s]+)%s+"([^%s]+)"')
+ if s and n then
+ local d = {}
+ d.size = tonumber(s, 16)
+ d.name = n
+ table.insert(data, d)
+ end
+ end
+ end
+
+ return data
+end
+
-- containing the whole environment is returned otherwise this function returns
-- the corresponding string value for the given name or nil if no such variable
-- exists.
diff --git a/modules/luci-base/po/ru/base.po b/modules/luci-base/po/ru/base.po
index 4fa5940c4b..d84167a520 100644
--- a/modules/luci-base/po/ru/base.po
+++ b/modules/luci-base/po/ru/base.po
@@ -2755,8 +2755,8 @@ msgid ""
"Query all available upstream <abbr title=\"Domain Name System\">DNS</abbr> "
"servers"
msgstr ""
-"Опрашивать все имеющиеся внешние <abbr title=\"Domain Name System\">DNS</abbr>"
-"-серверы"
+"Опрашивать все имеющиеся внешние <abbr title=\"Domain Name System\">DNS</"
+"abbr>-серверы"
msgid "R0 Key Lifetime"
msgstr "R0 Key время жизни"
diff --git a/modules/luci-base/po/tr/base.po b/modules/luci-base/po/tr/base.po
index 5113bc9869..f8d89b4b17 100644
--- a/modules/luci-base/po/tr/base.po
+++ b/modules/luci-base/po/tr/base.po
@@ -1,15 +1,16 @@
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"PO-Revision-Date: 2013-11-25 14:47+0200\n"
-"Last-Translator: qbilay <qbilay@mynet.com>\n"
+"Project-Id-Version: \n"
+"PO-Revision-Date: 2018-09-13 22:59+0300\n"
+"Last-Translator: Yusuf Soyipek <yusuf@soyipek.com>\n"
"Language-Team: none\n"
"Language: tr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Pootle 2.0.6\n"
+"X-Generator: Poedit 2.1.1\n"
+"POT-Creation-Date: \n"
msgid "%.1f dB"
msgstr ""
@@ -48,7 +49,7 @@ msgid "-- match by uuid --"
msgstr "-- uuid'e göre eşleştir --"
msgid "-- please select --"
-msgstr ""
+msgstr "-- lütfen seçin --"
msgid "1 Minute Load:"
msgstr "1 Dakikalık Yük:"
@@ -240,13 +241,13 @@ msgid "Add new interface..."
msgstr "Yeni arabirim ekle..."
msgid "Additional Hosts files"
-msgstr ""
+msgstr "Ek Hosts dosyaları"
msgid "Additional servers file"
-msgstr ""
+msgstr "Ek sunucular dosyası"
msgid "Address"
-msgstr "Adresler"
+msgstr "Adres"
msgid "Address to access local relay bridge"
msgstr ""
@@ -406,7 +407,7 @@ msgid "Apply unchecked"
msgstr ""
msgid "Architecture"
-msgstr ""
+msgstr "Mimari"
msgid ""
"Assign a part of given length of every public IPv6-prefix to this interface"
@@ -420,7 +421,7 @@ msgid ""
msgstr ""
msgid "Associated Stations"
-msgstr ""
+msgstr "İlişkili istasyonlar"
msgid "Associations"
msgstr ""
@@ -429,10 +430,10 @@ msgid "Auth Group"
msgstr ""
msgid "Authentication"
-msgstr "Kimlik doğrulama"
+msgstr "Kimlik Doğrulama"
msgid "Authentication Type"
-msgstr ""
+msgstr "Kimlik doğrulama türü"
msgid "Authoritative"
msgstr "Yetkilendirme"
@@ -504,7 +505,7 @@ msgid "Backup"
msgstr "Yedekleme"
msgid "Backup / Flash Firmware"
-msgstr ""
+msgstr "Yedek/Firmware Yazma"
msgid "Backup file list"
msgstr ""
@@ -534,16 +535,16 @@ msgid "Bind the tunnel to this interface (optional)."
msgstr ""
msgid "Bitrate"
-msgstr ""
+msgstr "Bit hızı"
msgid "Bogus NX Domain Override"
msgstr ""
msgid "Bridge"
-msgstr ""
+msgstr "Köprü"
msgid "Bridge interfaces"
-msgstr ""
+msgstr "Köprü arabirimleri"
msgid "Bridge unit number"
msgstr ""
@@ -558,7 +559,7 @@ msgid "Broadcom BCM%04x 802.11 Wireless Controller"
msgstr ""
msgid "Buffered"
-msgstr ""
+msgstr "Tamponlu"
msgid ""
"Build/distribution specific feed definitions. This file will NOT be "
@@ -643,6 +644,8 @@ msgid ""
"Click \"Generate archive\" to download a tar archive of the current "
"configuration files."
msgstr ""
+"Mevcut yapılandırma dosyalarının yeni bir arşivini indirmek için \"Arşiv "
+"Oluştur\"'u tıklayın."
msgid "Client"
msgstr ""
@@ -690,22 +693,22 @@ msgid "Configuration has been rolled back!"
msgstr ""
msgid "Confirmation"
-msgstr ""
+msgstr "Onayla"
msgid "Connect"
-msgstr ""
+msgstr "Bağlan"
msgid "Connected"
-msgstr ""
+msgstr "Bağlandı"
msgid "Connection Limit"
-msgstr ""
+msgstr "Bağlantı limiti"
msgid "Connection attempt failed"
msgstr ""
msgid "Connections"
-msgstr ""
+msgstr "Bağlantılar"
msgid ""
"Could not regain access to the device after applying the configuration "
@@ -714,10 +717,10 @@ msgid ""
msgstr ""
msgid "Country"
-msgstr ""
+msgstr "Ülke"
msgid "Country Code"
-msgstr ""
+msgstr "Ülke Kodu"
msgid "Cover the following interface"
msgstr ""
@@ -729,19 +732,19 @@ msgid "Create / Assign firewall-zone"
msgstr ""
msgid "Create Interface"
-msgstr ""
+msgstr "Arabirim Oluştur"
msgid "Create a bridge over multiple interfaces"
msgstr ""
msgid "Critical"
-msgstr ""
+msgstr "Kritik"
msgid "Cron Log Level"
msgstr ""
msgid "Custom Interface"
-msgstr ""
+msgstr "Özel Arabirim"
msgid "Custom delegated IPv6-prefix"
msgstr ""
@@ -828,19 +831,19 @@ msgid "Debug"
msgstr ""
msgid "Default %d"
-msgstr ""
+msgstr "Varsayılan"
msgid "Default gateway"
-msgstr ""
+msgstr "Default ağ geçidi"
msgid "Default is stateless + stateful"
msgstr ""
msgid "Default state"
-msgstr ""
+msgstr "Varsayılan durum"
msgid "Define a name for this network."
-msgstr ""
+msgstr "Bu ağ için bir ad tanımlayın."
msgid ""
"Define additional DHCP options, for example "
@@ -849,69 +852,71 @@ msgid ""
msgstr ""
msgid "Delete"
-msgstr ""
+msgstr "Sil"
msgid "Delete this network"
-msgstr ""
+msgstr "Bu ağı sil"
msgid "Delivery Traffic Indication Message Interval"
msgstr ""
msgid "Description"
-msgstr ""
+msgstr "Açıklama"
msgid "Design"
-msgstr ""
+msgstr "Tasarım"
msgid "Destination"
-msgstr ""
+msgstr "Hedef"
msgid "Device"
-msgstr ""
+msgstr "Cihaz"
msgid "Device Configuration"
-msgstr ""
+msgstr "Cihaz Yapılandırması"
msgid "Device is rebooting..."
-msgstr ""
+msgstr "Cihaz yeniden başlatılıyor..."
msgid "Device unreachable!"
-msgstr ""
+msgstr "Cihaz ulaşılamaz!"
msgid "Device unreachable! Still waiting for device..."
-msgstr ""
+msgstr "Cihaz ulaşılamaz! Hala cihazı bekliyorum..."
msgid "Diagnostics"
-msgstr ""
+msgstr "Tanı"
msgid "Dial number"
-msgstr ""
+msgstr "Arama numarası"
msgid "Directory"
-msgstr ""
+msgstr "Dizin"
msgid "Disable"
-msgstr ""
+msgstr "Pasif"
msgid ""
"Disable <abbr title=\"Dynamic Host Configuration Protocol\">DHCP</abbr> for "
"this interface."
msgstr ""
+"Bu arabirim için <abbr title=\"Dynamic Host Configuration Protocol\">DHCP</"
+"abbr>'yi devre dışı bırakın."
msgid "Disable DNS setup"
-msgstr ""
+msgstr "DNS kurulumunu devre dışı"
msgid "Disable Encryption"
-msgstr ""
+msgstr "Şifrelemeyi Devre Dışı"
msgid "Disable this network"
-msgstr ""
+msgstr "Ağ devre dışı"
msgid "Disabled"
-msgstr ""
+msgstr "Devre dışı"
msgid "Disabled (default)"
-msgstr ""
+msgstr "Devre dışı (varsayılan)"
msgid "Disassociate On Low Acknowledgement"
msgstr ""
@@ -920,16 +925,16 @@ msgid "Discard upstream RFC1918 responses"
msgstr ""
msgid "Disconnection attempt failed"
-msgstr ""
+msgstr "Bağlantı kesme girişimi başarısız oldu"
msgid "Dismiss"
-msgstr ""
+msgstr "Reddet"
msgid "Displaying only packages containing"
-msgstr ""
+msgstr "Yalnızca içeren paketler görüntüleniyor"
msgid "Distance Optimization"
-msgstr ""
+msgstr "Mesafe Optimizasyonu"
msgid "Distance to farthest network member in meters."
msgstr ""
@@ -1146,7 +1151,7 @@ msgid "Expand hosts"
msgstr ""
msgid "Expires"
-msgstr ""
+msgstr "Süre Bitişi"
msgid ""
"Expiry time of leased addresses, minimum is 2 minutes (<code>2m</code>)."
@@ -1236,19 +1241,19 @@ msgid "Firmware File"
msgstr ""
msgid "Firmware Version"
-msgstr ""
+msgstr "Firmware Versiyon"
msgid "Fixed source port for outbound DNS queries"
msgstr ""
msgid "Flash Firmware"
-msgstr ""
+msgstr "Firmware Güncelle"
msgid "Flash image..."
-msgstr ""
+msgstr "Dosyayı yaz..."
msgid "Flash new firmware image"
-msgstr ""
+msgstr "Yeni firmware dosyasını yaz"
msgid "Flash operations"
msgstr ""
@@ -1308,10 +1313,10 @@ msgid "Frame Bursting"
msgstr ""
msgid "Free"
-msgstr ""
+msgstr "Boş"
msgid "Free space"
-msgstr ""
+msgstr "Boş alan"
msgid ""
"Further information about WireGuard interfaces and peers at <a href=\"http://"
@@ -1325,7 +1330,7 @@ msgid "GPRS only"
msgstr ""
msgid "Gateway"
-msgstr ""
+msgstr "Ağ Geçidi"
msgid "Gateway address is invalid"
msgstr ""
@@ -1349,7 +1354,7 @@ msgid "Generate PMK locally"
msgstr ""
msgid "Generate archive"
-msgstr ""
+msgstr "Arşiv oluştur"
msgid "Generic 802.11%s Wireless Controller"
msgstr ""
@@ -1488,7 +1493,7 @@ msgid "IPv4+IPv6"
msgstr ""
msgid "IPv4-Address"
-msgstr ""
+msgstr "IPv4-Adres"
msgid "IPv4-in-IPv4 (RFC2003)"
msgstr ""
@@ -1539,7 +1544,7 @@ msgid "IPv6 suffix"
msgstr ""
msgid "IPv6-Address"
-msgstr ""
+msgstr "IPv6-Adres"
msgid "IPv6-PD"
msgstr ""
@@ -1707,7 +1712,7 @@ msgid "Kernel Log"
msgstr ""
msgid "Kernel Version"
-msgstr ""
+msgstr "Çekirdek Versiyonu"
msgid "Key"
msgstr ""
@@ -1758,7 +1763,7 @@ msgid "Leasefile"
msgstr ""
msgid "Leasetime remaining"
-msgstr ""
+msgstr "Kalan kira süresi"
msgid "Leave empty to autodetect"
msgstr ""
@@ -1839,7 +1844,7 @@ msgid "Load"
msgstr ""
msgid "Load Average"
-msgstr ""
+msgstr "Ortalama Yük"
msgid "Loading"
msgstr ""
@@ -1863,7 +1868,7 @@ msgid "Local Startup"
msgstr ""
msgid "Local Time"
-msgstr ""
+msgstr "Yerel Zaman"
msgid "Local domain"
msgstr ""
@@ -1915,7 +1920,7 @@ msgid "MAC"
msgstr ""
msgid "MAC-Address"
-msgstr ""
+msgstr "MAC-Adres"
msgid "MAC-Address Filter"
msgstr ""
@@ -1979,7 +1984,7 @@ msgid "Mbit/s"
msgstr ""
msgid "Memory"
-msgstr ""
+msgstr "Bellek"
msgid "Memory usage (%)"
msgstr ""
@@ -2101,10 +2106,10 @@ msgid "Navigation"
msgstr ""
msgid "Netmask"
-msgstr ""
+msgstr "Ağ Maskesi"
msgid "Network"
-msgstr ""
+msgstr "Ağ"
msgid "Network Utilities"
msgstr ""
@@ -2164,7 +2169,7 @@ msgid "No zone assigned"
msgstr ""
msgid "Noise"
-msgstr ""
+msgstr "Parazit"
msgid "Noise Margin (SNR)"
msgstr ""
@@ -2349,7 +2354,7 @@ msgid "Override the table used for internal routes"
msgstr ""
msgid "Overview"
-msgstr ""
+msgstr "Genel Bakış"
msgid "Owner"
msgstr ""
@@ -2543,7 +2548,7 @@ msgid "Prot."
msgstr ""
msgid "Protocol"
-msgstr ""
+msgstr "Protokol"
msgid "Protocol family"
msgstr ""
@@ -3370,7 +3375,7 @@ msgid "Tone"
msgstr ""
msgid "Total Available"
-msgstr ""
+msgstr "Toplam Mevcut"
msgid "Traceroute"
msgstr ""
@@ -3502,7 +3507,7 @@ msgid "Uploaded File"
msgstr "Yüklenen Dosya"
msgid "Uptime"
-msgstr "Açılma süresi"
+msgstr "Çalışma Zamanı"
msgid "Use <code>/etc/ethers</code>"
msgstr ""
diff --git a/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua b/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua
index 2fa7847fc6..46d2e36c32 100644
--- a/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua
+++ b/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua
@@ -35,6 +35,7 @@ function index()
entry({"admin", "system", "flashops"}, call("action_flashops"), _("Backup / Flash Firmware"), 70)
entry({"admin", "system", "flashops", "reset"}, post("action_reset"))
entry({"admin", "system", "flashops", "backup"}, post("action_backup"))
+ entry({"admin", "system", "flashops", "backupmtdblock"}, post("action_backupmtdblock"))
entry({"admin", "system", "flashops", "backupfiles"}, form("admin_system/backupfiles"))
-- call() instead of post() due to upload handling!
@@ -318,6 +319,23 @@ function action_backup()
luci.ltn12.pump.all(reader, luci.http.write)
end
+function action_backupmtdblock()
+ local http = require "luci.http"
+ local mv = http.formvalue("mtdblockname")
+ local m, s, n = mv:match('^([^%s]+)/([^%s]+)/([^%s]+)')
+
+ local reader = ltn12_popen("dd if=/dev/mtd%s conv=fsync,notrunc 2>/dev/null" % n)
+
+ luci.http.header(
+ 'Content-Disposition', 'attachment; filename="backup-%s-%s-%s.bin"' %{
+ luci.sys.hostname(), m,
+ os.date("%Y-%m-%d")
+ })
+
+ luci.http.prepare_content("application/octet-stream")
+ luci.ltn12.pump.all(reader, luci.http.write)
+end
+
function action_restore()
local fs = require "nixio.fs"
local http = require "luci.http"
diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/ifaces.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/ifaces.lua
index 06bce01fc4..8be354b448 100644
--- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/ifaces.lua
+++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/ifaces.lua
@@ -53,7 +53,7 @@ local function get_ifstate(name, option)
m.uci:foreach("luci", "ifstate", function (s)
if s.interface == name then
- val = m.uci:get("luci", s[".name"], option)
+ val = s[option]
return false
end
end)
diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/vlan.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/vlan.lua
index 3e46628d3f..d79b3c4704 100644
--- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/vlan.lua
+++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/vlan.lua
@@ -17,7 +17,7 @@ local update_interfaces = function(old_ifname, new_ifname)
local info = { }
m.uci:foreach("network", "interface", function(section)
- local old_ifnames = m.uci:get("network", section[".name"], "ifname")
+ local old_ifnames = section.ifname
local new_ifnames = { }
local cur_ifname
local changed = false
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm
index b409c8b039..03dd5aab29 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm
@@ -68,10 +68,12 @@ local route_host = luci.config.diag and luci.config.diag.route or "dev.openwrt.o
<div class="td left">
<input style="margin: 5px 0" type="text" value="<%=ping_host%>" name="ping" /><br />
<% if has_ping6 then %>
- <select name="ping_proto" style="width:auto">
- <option value="" selected="selected"><%:IPv4%></option>
- <option value="6"><%:IPv6%></option>
- </select>
+ <span>
+ <select name="ping_proto" style="width:auto">
+ <option value="" selected="selected"><%:IPv4%></option>
+ <option value="6"><%:IPv6%></option>
+ </select>
+ </span>
<input type="button" value="<%:Ping%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.ping, this.form.ping_proto.selectedIndex)" />
<% else %>
<input type="button" value="<%:Ping%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.ping)" />
@@ -81,10 +83,12 @@ local route_host = luci.config.diag and luci.config.diag.route or "dev.openwrt.o
<div class="td left">
<input style="margin: 5px 0" type="text" value="<%=route_host%>" name="traceroute" /><br />
<% if has_traceroute6 then %>
- <select name="traceroute_proto" style="width:auto">
- <option value="" selected="selected"><%:IPv4%></option>
- <option value="6"><%:IPv6%></option>
- </select>
+ <span>
+ <select name="traceroute_proto" style="width:auto">
+ <option value="" selected="selected"><%:IPv4%></option>
+ <option value="6"><%:IPv6%></option>
+ </select>
+ </span>
<input type="button" value="<%:Traceroute%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.traceroute, this.form.traceroute_proto.selectedIndex)" />
<% else %>
<input type="button" value="<%:Traceroute%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.traceroute)" />
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm b/modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm
index f3d2e8d7b0..8204d38e34 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_system/flashops.htm
@@ -59,6 +59,40 @@
<div class="cbi-section-error"><%:The backup archive does not appear to be a valid gzip file.%></div>
<% end %>
</div>
+
+ <% local mtds = require("luci.sys").mtds(); if #mtds > 0 then -%>
+ <h3><%:Save mtdblock contents%></h3>
+ <div class="cbi-section-descr"><%:Click "Save mtdblock" to download specified mtdblock file. (NOTE: THIS FEATURE IS FOR PROFESSIONALS! )%></div>
+ <div class="cbi-section-node">
+ <form class="inline" method="post" action="<%=url('admin/system/flashops/backupmtdblock')%>">
+ <input type="hidden" name="token" value="<%=token%>" />
+ <div class="cbi-value">
+ <label class="cbi-value-title" for="mtdblockname"><%:Choose mtdblock%></label>
+ <div class="cbi-value-field">
+ <select class="cbi-input-select" data-update="change" name="mtdblockname" id="mtdblockname">
+ <% for i, key in ipairs(mtds) do
+ if key and key.name ~= "rootfs_data" then -%>
+ <option<%=
+ attr("id", "mtdblockname-" .. key.name) ..
+ attr("value", key.name .. '/'.. key.size .. '/' .. i - 1) ..
+ attr("data-index", i) ..
+ ifattr(key.name == "linux" or key.name == "firmware", "selected", "selected")
+ %>><%=pcdata(key.name)%></option>
+ <% end
+ end -%>
+ </select>
+ </div>
+ </div>
+ <div class="cbi-value cbi-value-last<% if reset_avail then %> cbi-value-error<% end %>">
+ <label class="cbi-value-title" for="image"><%:Download mtdblock%></label>
+ <div class="cbi-value-field">
+ <input type="submit" class="cbi-button cbi-button-action important" value="<%:Save mtdblock%>" />
+ </div>
+ </div>
+ </form>
+ </div>
+ <% end %>
+
</div>
<div class="cbi-section">