libs/uci: support custom initalizers in luci.model.uci.bind
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 27 Oct 2009 21:38:15 +0000 (21:38 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 27 Oct 2009 21:38:15 +0000 (21:38 +0000)
libs/uci/luasrc/model/uci/bind.lua

index 6f9060d22402d282dde49fcf5783a1307dac66c5..84cfc773ffa094bd47a33a9c6faf96db01f13e32 100644 (file)
@@ -45,6 +45,10 @@ function bind.section(self, stype)
                inst.bind  = self
                inst.stype = stype
                inst.sid   = sid
+
+               if inst._init then
+                       inst:_init(sid)
+               end
        end
        return x
 end