mirror of
https://github.com/openwrt/luci.git
synced 2026-08-29 08:31:46 +04:00
applications/luci-splash: Make luci-splash more silent in normal mode in case of tc/iptables errors
This commit is contained in:
@@ -13,7 +13,7 @@ local net = sys.net
|
||||
local fs = require "luci.fs"
|
||||
local ip = require "luci.ip"
|
||||
|
||||
local debug = true
|
||||
local debug = false
|
||||
|
||||
local has_ipv6 = fs.access("/proc/net/ipv6_route") and fs.access("/usr/sbin/ip6tables")
|
||||
|
||||
@@ -26,12 +26,14 @@ function unlock()
|
||||
end
|
||||
|
||||
function exec(cmd)
|
||||
local ret = sys.exec(cmd)
|
||||
if debug then
|
||||
local ret = sys.exec(cmd)
|
||||
print('+ ' .. cmd)
|
||||
if ret and ret ~= "" then
|
||||
print(ret)
|
||||
end
|
||||
else
|
||||
local ret = sys.exec(cmd .. " &> /dev/null")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user