CDIST-TYPE__UCI(7)

πŸ’… cdist-type__uci β€” the manual page, bestie edition

okay so welcome to cdist-type__uci(7), the glow-up guide for editing OpenWrt config without losing your mind 🫢


✨ NAME ✨

cdist-type__uci β€” manage configuration values in UCI, no cap πŸ’–


🌸 DESCRIPTION 🌸

This cdist type is literally your bestie for changing configuration options inside OpenWrt's Unified Configuration Interface, aka UCI. It's giving "I just want to set a value, why is this so hard" energy, except it's not hard, because this type handles it. slay πŸ’…


πŸ‘‘ REQUIRED PARAMETERS πŸ‘‘

  • value β€” the actual value you wanna set, bestie. You can use it multiple times, so stack them up like your skincare routine ✨. Heads up though: this parameter is ignored if --state is absent πŸ™ˆ.
The way cdist handles arguments means your values must not contain newline characters. Periodt. No newlines. I don't make the rules, cdist does πŸ’€

Also! Values do not need special quoting for UCI. The only requirement is that the value gets passed to the type as a single shell argument. That's it, that's the whole vibe πŸŽ€


πŸ¦‹ OPTIONAL PARAMETERS πŸ¦‹

  • state β€” present or absent, and it defaults to present. So if you say nothing, it's showing up. main character energy only πŸ‘‘
  • type β€” should this generate an option or a list? Those are your two choices: option or list. It defaults to auto-detect based on how many --value parameters you threw at it 🌈

πŸ’€ BOOLEAN PARAMETERS πŸ’€

None. Not a single one. Zero. Empty. It's giving minimalist ✨


πŸ“ EXAMPLES πŸ“

okay here's where it gets fun, bestie. these are the real ones, copy them exactly, character for character, I am begging πŸ™

# Set the system hostname
__uci system.@system[0].hostname --value 'OpenWrt'

# Set DHCP option 252: tell DHCP clients to not ask for proxy information.
__uci dhcp.lan.dhcp_option --type list --value '252,"\n"'

# Enable NTP and NTPd (each is applied individually)
__uci system.ntp.enabled --value 1
__uci system.ntp.enable_server --value 1
__uci system.ntp.server --type list \
    --value '0.openwrt.pool.ntp.org' \
    --value '1.openwrt.pool.ntp.org' \
    --value '2.openwrt.pool.ntp.org' \
    --value '3.openwrt.pool.ntp.org'

see how the last one stacks four --value flags? that's the multiple-values thing in action, and it's highkey iconic πŸ”₯


🌈 SEE ALSO 🌈


πŸ’œ AUTHORS πŸ’œ

Dennis Camera <dennis.camera@ssrq-sds-fds.ch> β€” thank you for your service, king πŸ‘‘


πŸŽ€ COPYING πŸŽ€

Copyright (C) 2020 Dennis Camera. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. so basically: free to share, free to remix, just keep it GPL, periodt πŸ’…


ungleich GmbH 2021 β€” noted, respected, loved 🫢


and that's the whole page, bestie!! this was cdist-type__uci, version 7.0.0, dated Jul 31, 2022 🌸 go forth and configure your router, you absolute icon πŸ’–βœ¨

πŸ“¦ where this page comes from