[Resolved] JFFS contents deleted at every reboot?
Could use some help, please. My init-start script file works when run manually, but everything in /jffs/scripts disappears at reboot.
Hardware: RT-N66R
Firmware: 3.0.0.4.270.26 (Merlin build)
My OS: Win8
Goal: Daily scheduled reboot at specified time
JFFS is formatted and writable. The configs and scripts directories are present.
The following script is saved locally from Notepad++ (Unix/OSX formatting, UTF-8 w/o BOM), then copied to /jffs/scripts using WinSCP:
I've tried naming the file init-start, init-start.sh, and init-start.startup.
Once copied over, I run the following from the scripts directory, using SSH via PuTTY:
Running cru l at that point provides a null response, which I think is as expected. (A reboot should be needed to auto-initialize the script, right?)
If I manually run the script, I get the expected response from cru l:
But after rebooting (at any step), /scripts is always empty.
Could JFFS be getting reformatted every time, despite not being set to do so? I've searched extensively and perhaps I'm making a noob oversight, but I can't imagine what else could be causing this.
Any help would be appreciated. Thanks in advance.
Could use some help, please. My init-start script file works when run manually, but everything in /jffs/scripts disappears at reboot.
Hardware: RT-N66R
Firmware: 3.0.0.4.270.26 (Merlin build)
My OS: Win8
Goal: Daily scheduled reboot at specified time
JFFS is formatted and writable. The configs and scripts directories are present.
The following script is saved locally from Notepad++ (Unix/OSX formatting, UTF-8 w/o BOM), then copied to /jffs/scripts using WinSCP:
Code:
#!/bin/sh
cru a ScheduledReboot "0 4 * * * /sbin/reboot"
I've tried naming the file init-start, init-start.sh, and init-start.startup.
Once copied over, I run the following from the scripts directory, using SSH via PuTTY:
Code:
chmod a+rx init-start (or init-start.sh, or init-start.startup)
Running cru l at that point provides a null response, which I think is as expected. (A reboot should be needed to auto-initialize the script, right?)
If I manually run the script, I get the expected response from cru l:
And the router reboots at the specified time.0 4 * * * /sbin/reboot #ScheduledReboot#
But after rebooting (at any step), /scripts is always empty.
Could JFFS be getting reformatted every time, despite not being set to do so? I've searched extensively and perhaps I'm making a noob oversight, but I can't imagine what else could be causing this.
Any help would be appreciated. Thanks in advance.
Last edited: