OpenWrt Forum Archive

Topic: Cannot change any NVRAM variable through SSH

The content of this topic has been archived on 30 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I cannot change any of NVRAM variables using SSH which confuses me. If I have all ports in same vlan and want to separate them in two, let's say to make dmz or to have one port in vlan with wifi, and all others in separate vlan I do trivial nvram commands which can be found all around Internet and after that make: nvram commit. Or I want to disable DHCP on LAN or WAN or anything like that....

After that (making change) nothing is happening. Even after reboot everyting is like before. Just to mention all commands I enter went ok, with no errors.

Now, I feel very stupid and think it is somethiing trivial, but no chance to find solution.

Is there any step I forget to do before changing nvram parameters, or something like that?

Anything else is fine, using linux commands always successfull, with no errors or problems, just NVRAM variables......

Can someone help me with this?

Next is there any chance to list just one nvram parameter, not listing all the configuration? If I do:
nvram show  - I have all configuration listed
Now, I would like to see something like lan_ipaddr or lan_dhcp_enabled or .... I don't want to go through all configuration I want listed just this parameter.... it would be nice to have it like
nvram show lan_dhcp_enabled
but, when I print something like this it has no errors and list hole configuration again.... which is stupid, or it's me..... HELP ?

Thanks.

L.

"nvram get" prints only one parameter, like "nvram get lan_ipaddr". No idea why your changes are not committed...

Thanks for quick reply. This helps.

But still have first question. Probably I do not do it right, but if someone can point it out like you on second question it would be great.

Thanks.

If you try something simple like "nvram set test=123" and then "nvram get test", does it work ok? If you commit and reboot, does it work?

Well, now I don't know what to say. I successeded using your commands.
nvram set test=123
nvram get test
123
but, allow me to say that is not ok enough when I do
nvram unset test
I have no answer, which is ok, but is not OK, when I do
nvram get test
to have no answer that there is no such variable, too.... system is have taken that command like nothing happened.... it should say that there is no test variable set....

Now, I am convinced that I made some mistakes when saying that my NVRAM commands doesn't effect the system...they oviously does..... after making "your test"

I need, to double check it again and maybe reply again... if I don't successed...

Thank you once more time.

L.

The discussion might have continued from here.