Your config:

config pin
       option pincode1 '1'

means that "pin" is "Typed Section", while the uci:get require a "Named Section". You can use uci:get_first() with Typed Section, or convert to Named Section like this
config general pin
     option
("general" is Typed Section and "pin" now is Named Section)


On Mon 21 Jan 2013 02:40:53 PM ICT, . Elvis wrote:
Hi all,  Why I can not get "pinpro" value? I got empty!
/etc/config/verify
config pin
        option pincode1 '1'
        option oldcode '11'
        option protect 'disable'

In the model/cbi
function code.write(self, section, value)
        local pinpro = m.uci:get("verify", "pin", "protect")
 ---------------> is empty
        if pinpro == "enable" then
                pincode:add_error(section, translate("enable"))
        else
                pincode:add_error(section, translate("disable"))
        end
end

thanks all.


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

--
Regards,
Quân

Y!IM: ng_hquan_vn
GTalk: ng.hong.quan
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to