projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
c5c199b
)
Merge pull request #698 from cshore/pull-request-fix-lib-depends
author
Hannu Nyman
<hannu.nyman@iki.fi>
Fri, 8 Apr 2016 06:24:38 +0000
(09:24 +0300)
committer
Hannu Nyman
<hannu.nyman@iki.fi>
Fri, 8 Apr 2016 06:24:38 +0000
(09:24 +0300)
luci-base: utils: Make checklib return a boolean
modules/luci-base/luasrc/util.lua
patch
|
blob
|
history
diff --git
a/modules/luci-base/luasrc/util.lua
b/modules/luci-base/luasrc/util.lua
index
d614a6c
..
896e36b
100644
(file)
--- 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
--