Tomato 清除NVRAM中的空值
#!/bin/shtest -f /tmp/nvramshow && rm /tmp/nvramshow
nvram show >> /tmp/nvramshow
i=0
while read -r line; do
val=${line#*=}
var=${line%*=}
if [[ "$val" == "" ]] && [[ "$var" != "wl_wpa_psk" ]]; then
echo unset $var
nvram unset $var
fi
i=`expr $i + 1`
if [[ $i == 50 ]]; then
sleep 2
i=0
fi
done < /tmp/nvramshow
exit 0Reference:
http://www.dd-wrt.com/wiki/index.php/Asus_RT-N16
http://www.quakemachinex.com/blog/?p=218
頁:
[1]