summaryrefslogtreecommitdiffstats
path: root/interfaces-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-07-02 19:37:37 +0000
committerTed Trask <ttrask01@yahoo.com>2008-07-02 19:37:37 +0000
commitf9bd649db56f7d9f70b2a6b191528f6e08d4c675 (patch)
treee0469ce562e854b7cc4d4caa5d7eb9f5e4e128b0 /interfaces-model.lua
parent105b8e5ea1aa3cf0f7c3101cffc30727cc3ed70f (diff)
downloadacf-alpine-baselayout-f9bd649db56f7d9f70b2a6b191528f6e08d4c675.tar.bz2
acf-alpine-baselayout-f9bd649db56f7d9f70b2a6b191528f6e08d4c675.tar.xz
Changed interfaces to use controllerfunctions.
git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@1268 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'interfaces-model.lua')
-rw-r--r--interfaces-model.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/interfaces-model.lua b/interfaces-model.lua
index 776cd6f..bfa9bb8 100644
--- a/interfaces-model.lua
+++ b/interfaces-model.lua
@@ -280,11 +280,14 @@ iface.add_after = function (def, name)
end
iface.read = function (name)
- -- if the name is blank, then return nil
+ -- if the name is blank, then return a blank iface with error
iface.unpack_interfaces()
local rc, idx = iface.index(name)
if rc == false then
- return nil
+ local ret = iface.iface_type()
+ ret.value.name.value = name
+ ret.value.name.errtxt = "Interface does not exist"
+ return ret
end
return iface.array[idx]
end