feat: discard changes

This commit is contained in:
Michele Cereda
2023-09-23 15:30:16 +02:00
parent d8bf215a8f
commit 10089ef1c3

View File

@@ -15,17 +15,6 @@ Command line utility for OpenWrt's UCI system.
uci show
uci show 'dhcp'
# Show changes to the settings.
uci changes
uci changes 'dhcp'
# Commit changes.
uci commit
uci commit 'dhcp'
# Reload the configuration
reload_config
# Show what interface is the WAN.
uci show network.wan.device | cut -d "'" -f 2
@@ -43,6 +32,20 @@ uci del_list network.br_lan.ports='lan4'
uci add_list network.br_lan.ports='eth2'
uci commit 'network'
reload_config
# Show pending changes to the settings.
uci changes
uci changes 'dhcp'
# Commit pending changes.
uci commit
uci commit 'dhcp'
# Discard pending changes.
uci revert 'dhcp.cfg19fe63'
# Reload the configuration
reload_config
```
## Further readings