luci: optimize app binary find #2433 (#2442)

This commit is contained in:
Tianhe Y 2023-04-02 10:42:32 +08:00 committed by sbwml
parent a23667c265
commit 56c68dfda4

View File

@ -383,7 +383,7 @@ function get_customed_path(e)
end end
function is_finded(e) function is_finded(e)
return luci.sys.exec('type -t -p "/bin/%s" -p "%s" "%s"' % {e, get_customed_path(e), e}) ~= "" and true or false return luci.sys.exec('type -t -p "/bin/%s" -p "/usr/bin/%s" -p "%s" "%s"' % {e, e, get_customed_path(e), e}) ~= "" and true or false
end end
function clone(org) function clone(org)