diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-03-22 10:45:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-22 10:45:42 +0100 |
commit | 84b3ba46f8779f39f69b2646b5f071183a21020c (patch) | |
tree | 6481a396d4f482cac28e02cb001b62397b295a83 /modules/luci-base | |
parent | b254e329c6f4d96fce2b8b07ac0a9445e49d1958 (diff) | |
parent | 29d8770983674f161aac390a73b74c3c2318f38f (diff) |
Merge pull request #1695 from dibdot/regex-dhcphost
luci-base/util.lua: enhance checklib function
Diffstat (limited to 'modules/luci-base')
-rw-r--r-- | modules/luci-base/luasrc/util.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/luci-base/luasrc/util.lua b/modules/luci-base/luasrc/util.lua index 0e7334be8..28c126621 100644 --- a/modules/luci-base/luasrc/util.lua +++ b/modules/luci-base/luasrc/util.lua @@ -652,7 +652,8 @@ end function checklib(fullpathexe, wantedlib) local fs = require "nixio.fs" 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 end local libs = exec("/usr/bin/ldd " .. fullpathexe) |