summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-01-24 14:26:51 +0100
committerJo-Philipp Wich <jow@openwrt.org>2015-01-24 14:26:51 +0100
commit9feb1b8a7828cd025cb3bf8a0e58085cf1da64ca (patch)
tree02a418d5a7fcd079e353700b545c318eb1f7911d /modules/luci-mod-admin-full/luasrc/controller/admin/system.lua
parenteb1ef783f6a82c784f791880fd5e5ada5fa00bb5 (diff)
luci-mod-admin-full: use sysupgrade -T to test images
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc/controller/admin/system.lua')
-rw-r--r--modules/luci-mod-admin-full/luasrc/controller/admin/system.lua8
1 files changed, 1 insertions, 7 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua b/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua
index 055142b53e..52e347d07b 100644
--- a/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua
+++ b/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua
@@ -178,13 +178,7 @@ function action_flashops()
local image_tmp = "/tmp/firmware.img"
local function image_supported()
- -- XXX: yay...
- return ( 0 == os.execute(
- ". /lib/functions.sh; " ..
- "include /lib/upgrade; " ..
- "platform_check_image %q >/dev/null"
- % image_tmp
- ) )
+ return (os.execute("sysupgrade -T %q >/dev/null" % image_tmp) == 0)
end
local function image_checksum()