autocore: fix assigning eth_info variable
Local variable cannot be assigned in `if` function.
Fixes: c9b60a8780 ("autocore: refactor luci")
Reported-by: Hakurei Kyaru <hakureiyuyuko@kyarucloud.moe>
Tested-by: Hakurei Kyaru <hakureiyuyuko@kyarucloud.moe>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
a5e682d1f2
commit
339106c5ba
@ -59,10 +59,10 @@
|
||||
|
||||
local cpu_usage = luci.sys.exec("top -n1 | awk '/^CPU/ {printf(\"%d%\", 100 - $8)}'") or "6%"
|
||||
local cpu_info = luci.sys.exec("/sbin/cpuinfo") or "?"
|
||||
|
||||
local eth_info = ""
|
||||
if not has_switch then
|
||||
local eth_info = luci.sys.exec("ethinfo")
|
||||
else
|
||||
local eth_info = ""
|
||||
eth_info = luci.sys.exec("ethinfo")
|
||||
end
|
||||
|
||||
local rv = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user