SmallNetBuilder Forums
Go Back   SmallNetBuilder Forums > Wireless Networking > ASUS Wireless > Asuswrt-Merlin

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-13-2013, 08:35 AM
joegreat's Avatar
joegreat joegreat is offline
Very Senior Member
 
Join Date: Jan 2013
Location: Vienna, Austria
Posts: 402
Thanks: 502
Thanked 104 Times in 84 Posts
joegreat is just starting out
Question Chronology of the execution of user scripts

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:
Quote:
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

Last edited by joegreat; 01-13-2013 at 09:38 AM. Reason: Put the startup into the right order - THX to member ryzhov_al for support!
Reply With Quote
  #2  
Old 01-13-2013, 08:51 AM
ryzhov_al's Avatar
ryzhov_al ryzhov_al is offline
Very Senior Member
 
Join Date: Jul 2012
Location: Smolensk, Russia
Posts: 296
Thanks: 23
Thanked 199 Times in 106 Posts
ryzhov_al is just starting out
Send a message via ICQ to ryzhov_al Send a message via Skype™ to ryzhov_al
Default

Please, refer to Merlin's Wiki for scripts descriptions. Or place:
Quote:
#!/bin/sh

logger -t $(basename $0) "started [$@]"
to every script and see Syslog for it's run sequence and what parameters scripts will get.
__________________
The Entware. A modern Optware replacement.
Reply With Quote
The Following User Says Thank You to ryzhov_al For This Useful Post:
  #3  
Old 01-13-2013, 09:32 AM
joegreat's Avatar
joegreat joegreat is offline
Very Senior Member
 
Join Date: Jan 2013
Location: Vienna, Austria
Posts: 402
Thanks: 502
Thanked 104 Times in 84 Posts
joegreat is just starting out
Thumbs up

Quote:
Originally Posted by ryzhov_al View Post
Please, refer to Merlin's Wiki for scripts descriptions. Or place:
Quote:
#!/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:
Quote:
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
Reply With Quote
Reply

Tags
chronology, jffs, merlin, user scripts

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -4. The time now is 02:56 PM.

Top 10 Stats
Top Posters* Top Thanked
RMerlin  315
L&LD  152
stevech  144
thelonelycode...  142
azazel1024  113
Adamm  69
KGB7  64
speedingcheet...  58
jim769  55
TeHashX  54
RMerlin  4372
stevech  270
ryzhov_al  199
TeHashX  191
RogerSC  164
L&LD  163
joegreat  104
jlake  98
PrivateJoker  93
sinshiva  85
Most Viewed Threads* Hottest Threads*
Old Asuswrt-Merli...  17631
Old Beta Version...  17006
Old ASUS...  16496
Old 'Heartbleed'...  12335
Old Potential...  7528
Old Groundhog...  5974
Old Asus-Merlin...  5822
Old Linksys...  4834
Old Linksys...  4479
Old [TUTORIAL]...  2671
Old Asuswrt-Merli...  151
Old Beta Version...  112
Old Linksys...  106
Old Potential...  98
Old ASUS...  93
Old Groundhog...  49
Old Asus router...  43
Old [TUTORIAL]...  39
Old Asus-Merlin...  35
Old Linksys...  35



Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2006-2014 Pudai LLC All Rights Reserved.