Posted: Wed May 16, 2018 17:23 Post subject: Permanently store script in /etc/config for WIFI SES/WPS
I need your help for my little project.
I wrote a script to turn/toggle on/off wifi on my WRT3200ACM. The script is working until I store it in a folder the system is reading while pressing the SES/AOSS/EZ-SETUP button (the system will look for ".sesbutton" files).
Folders as follows:
The only folder I can write into/have permissions to write is tmp folder. Since this is a temporary folder the script will be deleted after every reboot.
Did anyone has an idea how to write into the /etc/config or any other of the mentioned folders?
These newer WRT routers have plenty of spare flash to format the /jffs partition. youll probably endup with about 28MB of usable space. That is what I get on my WRT1200AC v2
Once you have /jffs setup you have persistent on router storage that will last between reboots and flashes. Bear in mind this is the non replaceable on board flash. You do not want something running from here that is going to be constantly writing to /jffs else youll wear down the flash memory, but storing scripts or config files here is no problem
You enable /jffs on the administration/management tab
Another bonus if you have a NAS, or windows box that stays up all the time, mount your CIFS storage to an SMB share. This is what I have done in my case. I have nightly cron jobs that run on the router to backup the router NVRAM, Traffic data, and the /jffs storage. Also added a seperate weekly nvram backup, for those times you make a config change and discover days later something isn't right.
Replace <routerusername> <routerpassword> <routerip> with values appropriate to your config.