libs/uci: support custom initalizers in luci.model.uci.bind
[project/luci.git] / libs / uci / luasrc / model / uci / bind.lua
index 6f9060d..84cfc77 100644 (file)
@@ -45,6 +45,10 @@ function bind.section(self, stype)
                inst.bind  = self
                inst.stype = stype
                inst.sid   = sid
                inst.bind  = self
                inst.stype = stype
                inst.sid   = sid
+
+               if inst._init then
+                       inst:_init(sid)
+               end
        end
        return x
 end
        end
        return x
 end