Config file syntax check

Hello Folks,
Happy new year to you all forum members.

Help me with the below query if you can.

After I am done editing a config file (/etc/config/network, etc/config/firewall etc), is there a way to check that the syntax of the file is intact before I do a config reload or reboot?

Looking for a way to avoid bricking the system when I am editing a config file due to manual/cp-paste error.

I am aware of the command "uci changes", which apparently catches such errors. But I am not sure it covers the edits done using a file editor.

AFAIK uci show <file> will complain if there are syntax errors.


I did a negative test. Checks out fine.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.