diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2016-04-08 09:24:38 +0300 |
---|---|---|
committer | Hannu Nyman <hannu.nyman@iki.fi> | 2016-04-08 09:24:38 +0300 |
commit | cae7d7a301b195f1b3826320050124ac7068be5e (patch) | |
tree | e1ef890621ab3744dcfa64f02f5dbf13fb588c4e | |
parent | c5c199bc00108c7488c3d68f4ee6a7ebb28c0b54 (diff) | |
parent | 97f2937034d99642d79bf081d135e8fcd8e2bf3c (diff) |
Merge pull request #698 from cshore/pull-request-fix-lib-depends
luci-base: utils: Make checklib return a boolean
-rw-r--r-- | modules/luci-base/luasrc/util.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/luci-base/luasrc/util.lua b/modules/luci-base/luasrc/util.lua index d614a6c79..896e36b45 100644 --- a/modules/luci-base/luasrc/util.lua +++ b/modules/luci-base/luasrc/util.lua @@ -640,18 +640,18 @@ function checklib(fullpathexe, wantedlib) local fs = require "nixio.fs" local haveldd = fs.access('/usr/bin/ldd') if not haveldd then - return -1 + return false end local libs = exec("/usr/bin/ldd " .. fullpathexe) if not libs then - return 0 + return false end for k, v in ipairs(split(libs)) do if v:find(wantedlib) then - return 1 + return true end end - return 0 + return false end -- |