blob: e3e70d08db489a0d83c92543476b92565640ebab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
module (..., package.seeall)
require("modelfunctions")
require("fs")
local configfile = "/etc/modules"
function read_modules()
local f = io.popen("/sbin/lsmod")
local retval = f:read("*a")
f:close()
return cfe({ type="longtext", value=retval, label="Modules List" })
end
function read_file()
return modelfunctions.getfiledetails(configfile)
end
function write_file(filedetails)
return modelfunctions.setfiledetails(filedetails, {configfile})
end
function reloadmodules()
return modelfunctions.startstop_service("modutils", "start")
end
|