PDA

View Full Version : Remove from nvram



barsju
16-03-2005, 08:21
Is there a command I can use to remove entries from nvram?

I have UPnP entries that have been storded to nvram that I would like to remove. I find them with this command:

nvram show | grep forward_port

I could of course reset to factory default, but I'd rather not...

S.

RoofCat
16-03-2005, 13:05
Is there a command I can use to remove entries from nvram?

I have UPnP entries that have been storded to nvram that I would like to remove. I find them with this command:

nvram show | grep forward_port

I could of course reset to factory default, but I'd rather not...

S.


nvram unset var_name or smthg similar should work, I believe.

HTH
Roofcat

Antiloop
16-03-2005, 13:49
nvram unset var_name or smthg similar should work, I believe.

HTH
Roofcat
indeed that will work

also


nvram set var_name should work to erase the entry

after doing this do a commit

nvram commit

barsju
16-03-2005, 13:55
Thx! That works, and now I'm working on a script like this:


#!/bin/sh
i=$1
while [ $i -le $2 ]
do
nvram unset port_forward$i
i=$i + 1
done


but I keep getting

./clearUPnP: 8: +: not found

What gives??

S.