我需要找到如何在/ etc / config / network中删除OpenWRT上的静态路由
添加路线:
uci add network route
uci set network.@route[-1].interface=wan
uci set network.@route[-1].target=xxx.xxx.xxx.xxx
uci set network.@route[-1].netmask=aaa.aaa.aaa.aaa
uci set network.@route[-1].gateway=bbb.bbb.bbb.bbb
uci commit network
从/ etc / config / network执行此操作,我得到了:
config route
option interface 'wan'
option target 'xxx.xxx.xxx.xxx'
option netmask 'aaa.aaa.aaa.aaa'
option gateway 'bbb.bbb.bbb.bbb'
好的,这可行,但是如何删除? 如果我这样做:
uci delete network route
uci delete network.@route[-1].interface=wan
uci delete network.@route[-1].target=xxx.xxx.xxx.xxx
uci delete network.@route[-1].netmask=aaa.aaa.aaa.aaa
uci delete network.@route[-1].gateway=bbb.bbb.bbb.bbb
uci commit network
这是我从/ etc / config / network获得的
config route
option interface 'wan'
ip,sub和网关被删除,但“配置路由”和“选项接口'wan'”未被删除
我在做什么错了?
谢谢