diff options
Diffstat (limited to 'alpineversion-model.lua')
-rw-r--r-- | alpineversion-model.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/alpineversion-model.lua b/alpineversion-model.lua new file mode 100644 index 0000000..830cf59 --- /dev/null +++ b/alpineversion-model.lua @@ -0,0 +1,14 @@ +-- alpineversion model methods +module (..., package.seeall) + +-- no initializer in model - use controller.init for that + + +get = function (self) + require("fs") + local liboutput = fs.read_file("/etc/alpine-release") + if (liboutput == nil) or (liboutput == "") then + liboutput = "Unknown version" + end + return liboutput +end |