What's new

User-Scripts: Earliest time to access a file on jffs partition?

  • 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!

Mars2035

Occasional Visitor
Hi,
according to https://github.com/RMerl/asuswrt-merlin/wiki/User-scripts init-start is the earliest part right after jffs partion is mounted. Means that I can start accessing files on jffs from init-start script? E.g. to run program.
But if I call in /jffs/scripts/init-start
Code:
#!/bin/sh
stat /jffs/myprog > /jffs/myprog.log
it produces the log file but with empty content :(
Myprog is an executable that I can run fine after boot.

Or what would be then the earliest (user script) part to run an executable from jffs?

Thanks for answering.
 
init-start is the earliest. JFFS is obviously mounted, otherwise the router wouldn't be able to find init-start :)

The rest of the OS might not be ready yet however.
 
You mean standard tools and services, but why is it possible to make a bind mount on jffs as mentioned here https://www.snbforums.com/threads/tip-how-to-use-modified-webpages-for-the-webui.10847/ (mount /jffs/dnsmasq /usr/sbin/dnsmasq -o bind ...) ?

Because as mentioned JFFS is available at that point in time.

Where is your stat command located? It's not part of the firmware. So if it comes from Entware, Entware isn't up and running yet at that init-start time.
 

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