gluon-core: add gluon.model lua module

This commit is contained in:
Matthias Schiffer 2014-06-09 17:40:25 +02:00
parent 1d3e2e3d17
commit 1b259eefe5
1 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,21 @@
local util = require 'luci.util'
module 'gluon.model'
-- This must be generalized as soon as we support other OpenWrt archs
local board_name, model = util.exec('. /lib/functions.sh; . /lib/ar71xx.sh; ar71xx_board_detect; echo "$AR71XX_BOARD_NAME"; echo "$AR71XX_MODEL"'):match('([^\n]+)\n([^\n]+)')
function get_arch()
return 'ar71xx'
end
function get_board_name()
return board_name
end
function get_model()
return model
end