diff options
Diffstat (limited to 'samba-model.lua')
-rw-r--r-- | samba-model.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/samba-model.lua b/samba-model.lua index 1e2cd70..d3e068b 100644 --- a/samba-model.lua +++ b/samba-model.lua @@ -102,11 +102,11 @@ end -- ################################################################################ -- PUBLIC FUNCTIONS -function mymodule.get_startstop(self, clientdata) +function mymodule.get_startstop(self, clientdata) return modelfunctions.get_startstop(processname) end -function mymodule.startstop_service(self, startstop, action) +function mymodule.startstop_service(self, startstop, action) return modelfunctions.startstop_service(startstop, action) end @@ -122,7 +122,7 @@ function mymodule.listconfigfiles() table.insert(listed_files, filedetails) end table.sort(listed_files, function (a,b) return (a.filename < b.filename) end ) - + return cfe({ type="structure", value=listed_files, label="Samba File List" }) end @@ -225,15 +225,15 @@ function mymodule.read_share(self, clientdata) share.guest.value = "OK" end end - --share.invalid_users = + --share.invalid_users = share.path = cfe({ value=sharecfg.path or sharecfg.directory or "", label="Path", seq=3 }) share.printable = cfe({ type="boolean", value=config_to_bool(sharecfg.printable) or config_to_bool(sharecfg["print ok"]) or false, label="Printable", seq=6 }) - --share.read_list = + --share.read_list = share.writeable = cfe({ type="boolean", value=config_to_bool(sharecfg.writeable) or config_to_bool(sharecfg.writable) or (sharecfg["read only"] and not config_to_bool(sharecfg["read only"])) or false, label="Writable", seq=7 }) --share.username = (same as user and users) --share.valid_users = share.valid = cfe({ type="boolean", value=not sharecfg["-valid"] or config_to_bool(sharecfg["-valid"]), label="Enabled", seq=1 }) - --share.write_list = + --share.write_list = share.other = cfe({ type="longtext", value={}, label="Other parameters", seq=8 }) local reverseparams = {browseable=1, browsable=2, comment=3, public=4, ["guest ok"]=5, ["only guest"]=6, ["guest only"]=7, path=8, directory=9, printable=10, ["print ok"]=11, writeable=12, writable=13, ["read only"]=14, ["-valid"]=15 } for name,value in pairs(sharecfg) do |