Merge pull request #1695 from dibdot/regex-dhcphost
luci-base/util.lua: enhance checklib function
This commit is contained in:
commit
84b3ba46f8
1 changed files with 2 additions and 1 deletions
|
@ -652,7 +652,8 @@ end
|
||||||
function checklib(fullpathexe, wantedlib)
|
function checklib(fullpathexe, wantedlib)
|
||||||
local fs = require "nixio.fs"
|
local fs = require "nixio.fs"
|
||||||
local haveldd = fs.access('/usr/bin/ldd')
|
local haveldd = fs.access('/usr/bin/ldd')
|
||||||
if not haveldd then
|
local haveexe = fs.access(fullpathexe)
|
||||||
|
if not haveldd or not haveexe then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
local libs = exec("/usr/bin/ldd " .. fullpathexe)
|
local libs = exec("/usr/bin/ldd " .. fullpathexe)
|
||||||
|
|
Loading…
Reference in a new issue