summaryrefslogtreecommitdiffstats
path: root/interfaces-definitions.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-10-17 19:07:53 +0000
committerTed Trask <ttrask01@yahoo.com>2013-10-17 19:07:53 +0000
commit2ece009273252437281c8cc0b84ba2ec49e5d07c (patch)
tree1c082ee4891a4717f2fea09f0df4a8946d9fdb41 /interfaces-definitions.lua
parent0537a242f9709271454252e7897a7709144a3b02 (diff)
downloadacf-alpine-baselayout-2ece009273252437281c8cc0b84ba2ec49e5d07c.tar.bz2
acf-alpine-baselayout-2ece009273252437281c8cc0b84ba2ec49e5d07c.tar.xz
Remove all calls to 'module' in preparation for move to Lua 5.2
Use mymodule parameter for module definition. This was also helpful in revealing places where the code relied on the global environment.
Diffstat (limited to 'interfaces-definitions.lua')
-rw-r--r--interfaces-definitions.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/interfaces-definitions.lua b/interfaces-definitions.lua
index eaa979f..089e64b 100644
--- a/interfaces-definitions.lua
+++ b/interfaces-definitions.lua
@@ -1,6 +1,6 @@
-module (..., package.seeall)
+local mymodule = {}
-- Definitions of interface cfe's / options
- required = {
+ mymodule.required = {
comment = {type="longtext", label="Comments", seq=2},
auto = {type="boolean", value=false, label="Auto bring-up", seq=3},
name = {label="Interface Name", seq=1},
@@ -12,12 +12,12 @@ module (..., package.seeall)
['post-down'] = {type="longtext", label="'post-down' actions", seq=103},
other = {type="longtext", label="Other options (unsupported)", seq=104},
}
- family_methods = {
+ mymodule.family_methods = {
inet = {"loopback", "static", "manual", "dhcp", "bootp", "ppp", "wvdial"},
ipx = {"static", "dynamic"},
inet6 = {"loopback", "static", "manual", "v4tunnel"},
}
- method_options = {
+ mymodule.method_options = {
inet = {
static = {"address", "netmask", "broadcast", "network", "metric", "gateway", "pointopoint", "media", "hwaddress", "mtu"},
dhcp = {"hostname", "leasehours", "leasetime", "vendor", "client", "hwaddress"},
@@ -34,7 +34,7 @@ module (..., package.seeall)
v4tunnel = {"address", "netmask", "endpoint", "local", "gateway", "ttl"},
},
}
- optional = {
+ mymodule.optional = {
address = {label="Address", seq=6},
netmask = {label="Netmask", seq=7},
endpoint = {label="Endpoint address", seq=8},
@@ -60,3 +60,5 @@ module (..., package.seeall)
netnum = {label="Network number", seq=28},
ttl = {label="TTL setting", seq=29},
}
+
+return mymodule