From: Steven Barth Date: Sun, 3 Aug 2008 16:39:20 +0000 (+0000) Subject: libs/core: luci.model.ipkg: Use OPKG instead of IPKG if available X-Git-Tag: 0.8.0~541 X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=513e1cbba9e8ba98cc0b4f667aa89233b72b4dd1 libs/core: luci.model.ipkg: Use OPKG instead of IPKG if available --- diff --git a/libs/core/luasrc/model/ipkg.lua b/libs/core/luasrc/model/ipkg.lua index e95a2620a..075acc4c3 100644 --- a/libs/core/luasrc/model/ipkg.lua +++ b/libs/core/luasrc/model/ipkg.lua @@ -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)