From: Jo-Philipp Wich Date: Tue, 27 Oct 2009 21:38:15 +0000 (+0000) Subject: libs/uci: support custom initalizers in luci.model.uci.bind X-Git-Tag: 0.10.0~1064 X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=09fa7f18c925747c55d8ce09623a20d2df5a9563 libs/uci: support custom initalizers in luci.model.uci.bind --- diff --git a/libs/uci/luasrc/model/uci/bind.lua b/libs/uci/luasrc/model/uci/bind.lua index 6f9060d22..84cfc773f 100644 --- a/libs/uci/luasrc/model/uci/bind.lua +++ b/libs/uci/luasrc/model/uci/bind.lua @@ -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