Skip to content
Snippets Groups Projects
Commit e317bdc2 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-core: add gluon.model lua module

parent b89a0162
No related branches found
No related tags found
No related merge requests found
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment