libs/core: luci.model.ipkg: Use OPKG instead of IPKG if available
authorSteven Barth <steven@midlink.org>
Sun, 3 Aug 2008 16:39:20 +0000 (16:39 +0000)
committerSteven Barth <steven@midlink.org>
Sun, 3 Aug 2008 16:39:20 +0000 (16:39 +0000)
libs/core/luasrc/model/ipkg.lua

index e95a2620a0ac6fe47ac5ab81f3ce0834972f18ed..075acc4c3a10e639a65148ab6b662b45d93777ea 100644 (file)
@@ -28,8 +28,9 @@ limitations under the License.
 module("luci.model.ipkg", package.seeall)
 require("luci.sys")
 require("luci.util")
+require("luci.fs")
 
-ipkg = "ipkg"
+ipkg = luci.fs.access("/bin/opkg") and "opkg" or "ipkg"
 
 -- Returns repository information
 function info(pkg)