What's new

Chronology of the execution of user scripts

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

joegreat

Very Senior Member
Hi,

Asuswrt-Merlin supports user scripts. These will allow you to setup custom firewall rules, create jobs that can be run at scheduled intervals, or start new services (copy for Asuswrt-Merlin's wiki page).

I assume that there is a chronology of the user script execution at startup.

My guess for the startup would be something like this:
1. init-start - Right after JFFS just got mounted, and before any of the services get start.
2. wan-start - When the WAN interface just came up.
3. pre-mount - Just before a partition gets mounted - first partition.
4. nat-start - When the LAN interface just came up (?).
5. pre-mount - Just before a partition gets mounted - next partition.
6. firewall-start - Part of the system services startup (?).
7. post-mount - Just after a partition gets mounted - first partition.
8. services-start - After all other system services have been started at boot.
9. pre-mount - Just before a partition gets mounted - next partition.
10. post-mount - Just after a partition gets mounted - next partition.

Can you pls. help me to complete this list and put it into the right order?

With kind regards
Joe :cool:
 
Last edited:
Please, refer to Merlin's Wiki for scripts descriptions. Or place:
#!/bin/sh

logger -t $(basename $0) "started [$@]"
to every script and see Syslog for it's run sequence and what parameters scripts will get.
 
Please, refer to Merlin's Wiki for scripts descriptions. Or place:
#!/bin/sh
logger -t $(basename $0) "started [$@]"
to every script and see Syslog for it's run sequence and what parameters scripts will get.

Hi,

Thank you for the hint! The result is as follows: :)
Jan 1 01:00:09 START_init-start: started []
Jan 1 01:00:13 START_wan-start: started []
Jan 1 01:00:13 START_pre-mount: started [/dev/sda2]
Jan 1 01:00:13 START_nat-start: started []
Jan 1 01:00:13 START_pre-mount: started [/dev/sda4]
Jan 1 01:00:14 START_firewall-start: started []
Jan 1 01:00:15 START_post-mount: started [/tmp/mnt/Data]
Jan 1 01:00:15 START_services-start: started []
Jan 1 01:00:16 START_pre-mount: started [/dev/sdb1]
Jan 1 01:00:17 START_post-mount: started [/tmp/mnt/sdcard]

I have added START_ to each output so that I can easily find them...
Have updated my first posting with the right order.

With kind regards
Joe :cool:
 

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