What's new

NVRAM save before reboot

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Did you remember to click Apply afterwards?
 
I don't have the same hardware/firmware version as you, but assuming the NVRAM variables haven't changed this should work:

Save your current Wi-Fi schedules:
Code:
nvram show | grep -E "wl._timesched|wl._radio_date_x|wl._radio_time_x|wl._radio_time2_x" > /jffs/scripts/wifisched.nvram

Now create a /jffs/scripts/services-start script as follows (or append it to your existing script):
Code:
#!/bin/sh

# Create file with "nvram show | grep -E "wl._timesched|wl._radio_date_x|wl._radio_time_x|wl._radio_time2_x" > /jffs/scripts/wifisched.nvram"

while read line
do
    nvram set $line
done < /jffs/scripts/wifisched.nvram
nvram commit
 
Last edited:
I don't have the same hardware/firmware version as you, but assuming the NVRAM variables haven't changed this should work:

Save your current Wi-Fi schedules:
Code:
nvram show | grep -E "wl._timesched|wl._radio_date_x|wl._radio_time_x|wl._radio_time2_x" > /jffs/scripts/wifisched.nvram

Now create a /jffs/scripts/services-start script as follows (or append it to your existing script):
Code:
#!/bin/sh

# Create file with "nvram show | grep -E "wl._timesched|wl._radio_date_x|wl._radio_time_x|wl._radio_time2_x" > /jffs/scripts/wifisched.nvram"

while read line
do
    nvram set $line
done < /jffs/scripts/wifisched.nvram
nvram commit
Colin,

How will this script be executed automatically at reboot?
 
There are scripts that run automatically (if they exist) when certain events occur.

https://github.com/RMerl/asuswrt-merlin/wiki/User-scripts
It doesn't work.
These are the variables' values I get in the wifisched.nvram file:
upload_2018-3-28_20-56-14.png


It looks to me that they don't cover the entire array for all the hours and days of the week
 
Can you post a screen shot of your schedule as seen in the GUI. I think I'm misunderstanding what you're trying to do.
 
Ah I see. We're talking about different things. I thought you were talking about the Wireless Scheduler under Wireless > Professional that looks like this:
Untitled.png


What router page are you seeing that schedule? It's possible that my firmware doesn't have it.
 
The ac86u is on a new platform - the wifi scheduler is also under wireless - professional but it looks like I showed you
 
Ah, OK. Sorry, I can't help you as I don't know what NVRAM variables are used now. I've had a quick look at the source code for 384 but it's not immediately obvious what the variables are. Maybe someone else knows.
 
@Jerry_gsp I may have found it. Can you run the following command from the router's command line:

nvram show | grep wl._ | grep sched | sort
 
It doesn't work.
These are the variables' values I get in the wifisched.nvram file:
View attachment 12505

It looks to me that they don't cover the entire array for all the hours and days of the week

Try these nvram variables

Code:
nvram show 2> /dev/null | grep MULTI
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top