X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=applications%2Fluci-app-travelmate%2Fluasrc%2Fcontroller%2Ftravelmate.lua;h=b2b877347c198e4e0a9647db694b4c2975020514;hp=0f7583497f45479f4e4c585662b4516ae8aa9d54;hb=9dcf73b323fa97534a931e3acfbab8b03ce3961f;hpb=6ffb7056fede2c9f52de5fb665462b4ce2990fa4 diff --git a/applications/luci-app-travelmate/luasrc/controller/travelmate.lua b/applications/luci-app-travelmate/luasrc/controller/travelmate.lua index 0f7583497..b2b877347 100644 --- a/applications/luci-app-travelmate/luasrc/controller/travelmate.lua +++ b/applications/luci-app-travelmate/luasrc/controller/travelmate.lua @@ -3,7 +3,6 @@ module("luci.controller.travelmate", package.seeall) -local fs = require("nixio.fs") local util = require("luci.util") local i18n = require("luci.i18n") local templ = require("luci.template") @@ -22,6 +21,7 @@ function index() entry({"admin", "services", "travelmate", "advanced", "cfg_network"}, cbi("travelmate/cfg_network_tab"), _("Edit Network Configuration"), 130).leaf = true entry({"admin", "services", "travelmate", "advanced", "cfg_firewall"}, cbi("travelmate/cfg_firewall_tab"), _("Edit Firewall Configuration"), 140).leaf = true + entry({"admin", "services", "travelmate", "apqr"}, template("travelmate/ap_qr")).leaf = true entry({"admin", "services", "travelmate", "wifiscan"}, template("travelmate/wifi_scan")).leaf = true entry({"admin", "services", "travelmate", "wifiadd"}, cbi("travelmate/wifi_add", {hideresetbtn=true, hidesavebtn=true})).leaf = true entry({"admin", "services", "travelmate", "wifiedit"}, cbi("travelmate/wifi_edit", {hideresetbtn=true, hidesavebtn=true})).leaf = true @@ -30,11 +30,11 @@ function index() end function logread() - local logfile + local logfile = "" if nixio.fs.access("/var/log/messages") then logfile = util.trim(util.exec("grep -F 'travelmate-' /var/log/messages")) - else + elseif nixio.fs.access("/sbin/logread") then logfile = util.trim(util.exec("logread -e 'travelmate-'")) end templ.render("travelmate/logread", {title = i18n.translate("Travelmate Logfile"), content = logfile})