#19578: uci show / regression / output contains single quotes
------------------------+------------------------
Reporter: bittorf@… | Owner: developers
Type: defect | Status: closed
Priority: normal | Milestone:
Component: packages | Version: Trunk
Resolution: not_a_bug | Keywords:
------------------------+------------------------
Changes (by jow):
* status: new => closed
* resolution: => not_a_bug
Comment:
You scripts are broken, the "uci show" output was *never* meant to be
parsed by scripts since it is ambiguous.
* Instead parsing `system.@system[0].hostname='box'` use `uci -q get
system.@system[0].hostname`.
* Instead of `uci show network.@switch_vlan[] | grep =switch0` use `[
"$(uci -q get network.@switch_vlan[0].device)" = "switch0" ]`
Or, even better, properly use the shell api:
http://wiki.openwrt.org/doc/devel/config-scripting
--
Ticket URL: <https://dev.openwrt.org/ticket/19578#comment:1>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets