diff options
author | Manuel Munz <munz@comuno.net> | 2015-05-30 21:04:50 +0200 |
---|---|---|
committer | Manuel Munz <munz@comuno.net> | 2015-05-30 21:04:50 +0200 |
commit | 516ea62f73a9fbb50ae7f517d4c7462c4459533c (patch) | |
tree | 85a0d36d9c46cdff1965b4177143bcc7d4c7243b /applications | |
parent | cc39eaa681bbd9e35be1c3729efa102ddb0a20a4 (diff) |
applications/olsr: redirect errors on jsoninfo connects with netcat to /dev/null to avoid spamming the log
Diffstat (limited to 'applications')
-rw-r--r-- | applications/luci-app-olsr/luasrc/controller/olsr.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/applications/luci-app-olsr/luasrc/controller/olsr.lua b/applications/luci-app-olsr/luasrc/controller/olsr.lua index 3a5838d03..cfadd9b7c 100644 --- a/applications/luci-app-olsr/luasrc/controller/olsr.lua +++ b/applications/luci-app-olsr/luasrc/controller/olsr.lua @@ -87,8 +87,8 @@ function action_json() local v4_port = uci:get("olsrd", "olsrd_jsoninfo", "port") or 9090 local v6_port = uci:get("olsrd6", "olsrd_jsoninfo", "port") or 9090 - jsonreq4 = utl.exec("echo /status | nc 127.0.0.1 " .. v4_port ) - jsonreq6 = utl.exec("echo /status | nc ::1 " .. v6_port) + jsonreq4 = utl.exec("(echo /status | nc 127.0.0.1 " .. v4_port .. ") 2>/dev/null" ) + jsonreq6 = utl.exec("(echo /status | nc ::1 " .. v6_port .. ") 2>/dev/null") http.prepare_content("application/json") if not jsonreq4 or jsonreq4 == "" then jsonreq4 = "{}" @@ -374,8 +374,8 @@ function fetch_jsoninfo(otable) local v4_port = uci:get("olsrd", "olsrd_jsoninfo", "port") or 9090 local v6_port = uci:get("olsrd6", "olsrd_jsoninfo", "port") or 9090 - jsonreq4 = utl.exec("echo /" .. otable .. " | nc 127.0.0.1 " .. v4_port) - jsonreq6 = utl.exec("echo /" .. otable .. " | nc ::1 " .. v6_port) + jsonreq4 = utl.exec("(echo /" .. otable .. " | nc 127.0.0.1 " .. v4_port .. ") 2>/dev/null") + jsonreq6 = utl.exec("(echo /" .. otable .. " | nc ::1 " .. v6_port .. ") 2>/dev/null") local jsondata4 = {} local jsondata6 = {} local data4 = {} |