Where are startup scripts in ddwrt

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page 1, 2  Next
Author Message
emm
DD-WRT Novice


Joined: 27 Nov 2017
Posts: 4

PostPosted: Tue Feb 27, 2018 12:26    Post subject: Where are startup scripts in ddwrt Reply with quote
I cannot find system startup scripts in my router.

For example what script or application setups for IP on wired interface or SSID on radio according to the nvram config.
Sponsor
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1855
Location: Hung Hom, Hong Kong

PostPosted: Tue Feb 27, 2018 15:10    Post subject: Re: Where are startup scripts in ddwrt Reply with quote
emm wrote:
I cannot find system startup scripts in my router.
For example what script or application setups for IP on wired interface or SSID on radio according to the nvram config.


https://www.dd-wrt.com/wiki/index.php/Startup_Scripts

https://www.dd-wrt.com/phpBB2/viewtopic.php?p=766089

_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
jwh7
DD-WRT Guru


Joined: 25 Oct 2013
Posts: 2670
Location: Indy

PostPosted: Tue Feb 27, 2018 16:54    Post subject: Re: Where are startup scripts in ddwrt Reply with quote
mwchang wrote:
emm wrote:
I cannot find system startup scripts in my router.
For example what script or application setups for IP on wired interface or SSID on radio according to the nvram config.
https://www.dd-wrt.com/wiki/index.php/Startup_Scripts
https://www.dd-wrt.com/phpBB2/viewtopic.php?p=766089
I think they're looking for system init, not user init. I'm not sure there are scripts for it, probably all compiled as that would use less flash. I found one file for a script example, but this is qtn (QuaNTana I presume), not Broadcom:
http://svn.dd-wrt.com/browser/src/router/qtn/images/router_command.sh

You'll have to search and dig around the code. Smile

_________________
# NAT/SFE/CTF: limited speed w/ DD # Repeater issues # DD-WRT info: FAQ, Builds, Types, Modes, Changes, Demo #
OPNsense x64 5050e ITX|DD: DIR-810L, 2*EA6900@1GHz, R6300v1, RT-N66U@663, WNDR4000@533, E1500@353,
WRT54G{Lv1.1,Sv6}@250
|FreshTomato: F7D8302@532|OpenWRT: F9K1119v1, RT-ACRH13, R6220, WNDR3700v4
emm
DD-WRT Novice


Joined: 27 Nov 2017
Posts: 4

PostPosted: Wed Feb 28, 2018 15:30    Post subject: Reply with quote
jwh7 wrote:
I think they're looking for system init, not user init. I'm not sure there are scripts for it, probably all compiled as that would use less flash. I found one file for a script example, but this is qtn (QuaNTana I presume), not Broadcom:
http://svn.dd-wrt.com/browser/src/router/qtn/images/router_command.sh
You'll have to search and dig around the code. Smile
You hit my point, this was a question about. This script file is more or less I am looking for, but for broadcom ddwrt. So source code is only direction? Are there any development documentation regarding boot phase?

d0ug wrote:
Unless you download the source and make the edits yourself and then compile it, you are not going to be able to make any changes to the startup process. The whole file system is read only.
I do not care about changeing, I want to see how (commands/API, etc) some things are setup on router.
jwh7
DD-WRT Guru


Joined: 25 Oct 2013
Posts: 2670
Location: Indy

PostPosted: Fri Mar 02, 2018 14:12    Post subject: Reply with quote
emm wrote:
This script file is more or less I am looking for, but for broadcom ddwrt. So source code is only direction? Are there any development documentation regarding boot phase?
http://svn.dd-wrt.com/browser/src/router/services/sysinit/
_________________
# NAT/SFE/CTF: limited speed w/ DD # Repeater issues # DD-WRT info: FAQ, Builds, Types, Modes, Changes, Demo #
OPNsense x64 5050e ITX|DD: DIR-810L, 2*EA6900@1GHz, R6300v1, RT-N66U@663, WNDR4000@533, E1500@353,
WRT54G{Lv1.1,Sv6}@250
|FreshTomato: F7D8302@532|OpenWRT: F9K1119v1, RT-ACRH13, R6220, WNDR3700v4
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1855
Location: Hung Hom, Hong Kong

PostPosted: Sat Mar 26, 2022 8:48    Post subject: Re: Where are startup scripts in ddwrt Reply with quote
emm wrote:
I cannot find system startup scripts in my router.

For example what script or application setups for IP on wired interface or SSID on radio according to the nvram config.

I just learnt that Admin->Commands->Save USB created a file "/tmp/.rc_usb". "Save Startup" should create a file with similar name, possibly ".rc_startup" or whatever... and after a few clicks, got these:
Code:
root@dd-wrt:/tmp# ls -la .rc*
-rwx------    1 root     root            26 Mar 26 16:49 .rc_firewall
-rwx------    1 root     root            16 Mar 26 16:49 .rc_shutdown
-rwx------    1 root     root             3 Mar 26 16:48 .rc_startup
-rwx------    1 root     root         417 Mar 26 16:38 .rc_usb

But then I don't know when these scripts would be executed, notably .rc_startup and .rc_usb. I never knew precisely when sysinit of DD-WRT ended. What should I look for in /var/log/messages? Or was it a signal file? Smile

Modern Linux init executes startup stuffs in parallel, NOT in predefined, predictable order and manner.


_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Sat Mar 26, 2022 9:43    Post subject: Reply with quote
All these are stored in nvram for startup, firewall, usb, for a quick test add a startup script and run via terminal nvram show | grep startup, you can test the others also.

Anything on /tmp/rc_whatever are generated from the nvram stored bits.

I dont use jffs so idk how this would behave then, if special config is required to store stuff on there for these, bu in any case /tmp stuff is generated from nvram values typically.

Mind these have to be one liners or be escaped properly depending on what you do.

also just noticed this is mwchang necroposted a reply to a OP req from 2018 so my bad for following that necro up too.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1855
Location: Hung Hom, Hong Kong

PostPosted: Sat Mar 26, 2022 12:47    Post subject: Reply with quote
the-joker wrote:
also just noticed this is mwchang necroposted a reply to a OP req from 2018 so my bad for following that necro up too.

My bad, I was trying to find out when and where DD-WRT's sysinit finished its business, and then I found this old thread. I should start a new thread. Sorry... my apology! Smile

BTW, here is the log which shown repeated attempts to start the same set of services. If you looked and counted closely, only "[inadyn]" and "[ddns]" were not executed too many times.

Could this part of the sysinit process optimized? By doing so, the router's startup time could be reduced.
Code:

Jan  1 08:00:12 RT-N18U-HST user.info : [klogd] : daemon successfully started
Jan  1 08:00:12 RT-N18U-HST user.info : [resetbutton] : resetbutton daemon successfully started
Jan  1 08:00:12 RT-N18U-HST user.info : [bridge] : bridge br0 successfully added
Jan  1 08:00:12 RT-N18U-HST user.info : [bridge] : interface vlan1 successfully added to bridge br0
Jan  1 08:00:13 RT-N18U-HST user.info : [bridge] : interface eth1 successfully added to bridge br0
Jan  1 08:00:14 RT-N18U-HST user.info : [klogd] : kernel log daemon successfully stopped
Jan  1 08:00:14 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully stopped
Jan  1 08:00:14 RT-N18U-HST user.info : [syslogd] : syslog daemon successfully stopped
Jan  1 08:00:16 RT-N18U-HST user.info : [minidlna] : DLNA Media Server successfully started
Jan  1 08:00:17 RT-N18U-HST user.info : [vpn modules] : vpn modules successfully unloaded
Jan  1 08:00:17 RT-N18U-HST user.info : [dnsmasq] : daemon successfully started
Jan  1 08:00:20 RT-N18U-HST user.info : [httpd] : http daemon successfully started
Jan  1 08:00:20 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully started
Jan  1 08:00:23 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully started
Jan  1 08:00:24 RT-N18U-HST user.info : [unbound] : recursive dns resolver daemon successfully started
Jan  1 08:00:24 RT-N18U-HST user.info : [dropbear] : ssh daemon successfully started
Jan  1 08:00:29 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully stopped
Jan  1 08:00:29 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully started
Jan  1 08:00:32 RT-N18U-HST user.info : [wland] : daemon successfully stopped
Jan  1 08:00:32 RT-N18U-HST user.info : [wland] : daemon successfully started
Jan  1 08:00:32 RT-N18U-HST user.info : [dnsmasq] : daemon successfully stopped
Jan  1 08:00:32 RT-N18U-HST user.info : [dnsmasq] : daemon successfully started
Jan  1 08:00:32 RT-N18U-HST user.info : [unbound] : daemon successfully stopped
Jan  1 08:00:32 RT-N18U-HST user.info : [unbound] : recursive dns resolver daemon successfully started
Jan  1 08:00:32 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully stopped
Jan  1 08:00:33 RT-N18U-HST user.info : [vpn modules] : vpn modules successfully unloaded
Jan  1 08:00:34 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully started
Jan  1 08:00:35 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully started
Jan  1 08:00:35 RT-N18U-HST user.info : [process_monitor] : successfully started
Jan  1 08:00:35 RT-N18U-HST user.info : [ddns] : inadyn daemon successfully started
Mar 26 20:27:36 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully stopped
Mar 26 20:27:36 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully started
Mar 26 20:27:36 RT-N18U-HST user.info : [nas] : NAS lan (wl0 interface) successfully started
Mar 26 20:27:37 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully stopped
Mar 26 20:27:37 RT-N18U-HST user.info : [nas] : daemon successfully stopped
Mar 26 20:27:38 RT-N18U-HST user.info : [nas] : NAS lan (wl0 interface) successfully started
Mar 26 20:27:38 RT-N18U-HST user.info : [httpd] : daemon successfully stopped
Mar 26 20:27:38 RT-N18U-HST user.info : [httpd] : http daemon successfully started
Mar 26 20:27:38 RT-N18U-HST user.info : [resetbutton] : daemon successfully stopped
Mar 26 20:27:38 RT-N18U-HST user.info : [resetbutton] : resetbutton daemon successfully started
Mar 26 20:27:39 RT-N18U-HST user.info : [vpn modules] : vpn modules successfully unloaded
Mar 26 20:27:40 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully started
Mar 26 20:27:41 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully started
Mar 26 20:27:42 RT-N18U-HST user.info : [unbound] : daemon successfully stopped
Mar 26 20:27:42 RT-N18U-HST user.info : [unbound] : recursive dns resolver daemon successfully started
Mar 26 20:27:42 RT-N18U-HST user.info : [unbound] : daemon successfully stopped
Mar 26 20:27:43 RT-N18U-HST user.info : [unbound] : recursive dns resolver daemon successfully started
Mar 26 20:27:43 RT-N18U-HST user.info : [process_monitor] : daemon successfully stopped
Mar 26 20:27:43 RT-N18U-HST user.info : [wsdd2] : windows service discovery daemon successfully stopped
Mar 26 20:27:43 RT-N18U-HST user.info : [minidlna] : DLNA Media Server successfully stopped
Mar 26 20:27:43 RT-N18U-HST user.info : [ksmbd.mountd] : samba daemon successfully stopped
Mar 26 20:27:43 RT-N18U-HST user.info : [process_monitor] : successfully started
Mar 26 20:27:43 RT-N18U-HST user.info : [lighttpd] : daemon successfully stopped
Mar 26 20:27:47 RT-N18U-HST user.info : [minidlna] : DLNA Media Server successfully started
Mar 26 20:27:48 RT-N18U-HST user.info : [minidlna] : DLNA Media Server successfully stopped
Mar 26 20:27:48 RT-N18U-HST user.info : [minidlna] : DLNA Media Server successfully started
Mar 26 20:28:12 RT-N18U-HST user.info : [unbound] : daemon successfully stopped
Mar 26 20:28:12 RT-N18U-HST user.info : [minidlna] : DLNA Media Server successfully stopped
Mar 26 20:28:13 RT-N18U-HST user.info : [unbound] : recursive dns resolver daemon successfully started
Mar 26 20:28:13 RT-N18U-HST user.info : [minidlna] : DLNA Media Server successfully started
Mar 26 20:28:13 RT-N18U-HST user.info : [wsdd2] : windows service discovery daemon successfully stopped
Mar 26 20:28:14 RT-N18U-HST user.info : [ksmbd.mountd] : samba daemon successfully stopped
Mar 26 20:28:15 RT-N18U-HST user.info : [minidlna] : DLNA Media Server successfully stopped
Mar 26 20:28:15 RT-N18U-HST user.info : [minidlna] : DLNA Media Server successfully started
Mar 26 20:33:05 RT-N18U-HST user.info : [dnsmasq] : daemon successfully stopped
Mar 26 20:33:05 RT-N18U-HST user.info : [unbound] : daemon successfully stopped
Mar 26 20:33:05 RT-N18U-HST user.info : [wland] : daemon successfully stopped
Mar 26 20:33:05 RT-N18U-HST user.info : [wsdd2] : windows service discovery daemon successfully stopped
Mar 26 20:33:05 RT-N18U-HST user.info : [lighttpd] : daemon successfully stopped
Mar 26 20:33:05 RT-N18U-HST user.info : [dnsmasq] : daemon successfully stopped
Mar 26 20:33:05 RT-N18U-HST user.info : [pptpd] : daemon successfully stopped
Mar 26 20:33:05 RT-N18U-HST user.info : [ksmbd.mountd] : samba daemon successfully stopped
Mar 26 20:33:05 RT-N18U-HST user.info : [nas] : daemon successfully stopped
Mar 26 20:33:06 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully stopped
Mar 26 20:33:06 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully started
Mar 26 20:33:06 RT-N18U-HST user.info : [udhcpc] : udhcp client process successfully stopped
Mar 26 20:33:06 RT-N18U-HST user.info : [bridge] : interface vlan1 successfully deleted from bridge br0
Mar 26 20:33:06 RT-N18U-HST user.info : [bridge] : interface eth1 successfully deleted from bridge br0
Mar 26 20:33:06 RT-N18U-HST user.info : [bridge] : bridge br0 successfully deleted
Mar 26 20:33:07 RT-N18U-HST user.info : [resetbutton] : daemon successfully stopped
Mar 26 20:33:07 RT-N18U-HST user.info : [ipv6] : successfully stopped
Mar 26 20:33:07 RT-N18U-HST user.info : [klogd] : kernel log daemon successfully stopped
Mar 26 20:33:07 RT-N18U-HST user.info : [syslogd] : syslog daemon successfully stopped
Mar 26 20:33:07 RT-N18U-HST user.info : [resetbutton] : resetbutton daemon successfully started
Mar 26 20:33:07 RT-N18U-HST user.info : [bridge] : bridge br0 successfully added
Mar 26 20:33:07 RT-N18U-HST user.info : [bridge] : interface vlan1 successfully added to bridge br0
Mar 26 20:33:07 RT-N18U-HST user.info : [bridge] : interface eth1 successfully added to bridge br0
Mar 26 20:33:08 RT-N18U-HST user.info : [klogd] : kernel log daemon successfully stopped
Mar 26 20:33:08 RT-N18U-HST user.info : [minidlna] : DLNA Media Server successfully stopped
Mar 26 20:33:08 RT-N18U-HST user.info : [wland] : daemon successfully started
Mar 26 20:33:08 RT-N18U-HST user.info : [dnsmasq] : daemon successfully started
Mar 26 20:33:08 RT-N18U-HST user.info : [syslogd] : syslog daemon successfully stopped
Mar 26 20:33:09 RT-N18U-HST user.info : [unbound] : recursive dns resolver daemon successfully started
Mar 26 20:33:10 RT-N18U-HST user.info : [httpd] : daemon successfully stopped
Mar 26 20:33:10 RT-N18U-HST user.info : [httpd] : http daemon successfully started
Mar 26 20:33:10 RT-N18U-HST user.info : [vpn modules] : vpn modules successfully unloaded
Mar 26 20:33:10 RT-N18U-HST user.info : [minidlna] : DLNA Media Server successfully started
Mar 26 20:33:10 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully started
Mar 26 20:33:11 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully started
Mar 26 20:33:13 RT-N18U-HST user.info : [nas] : NAS lan (wl0 interface) successfully started
Mar 26 20:33:14 RT-N18U-HST user.info : [nas] : daemon successfully stopped
Mar 26 20:33:14 RT-N18U-HST user.info : [nas] : NAS lan (wl0 interface) successfully started
Mar 26 20:33:14 RT-N18U-HST user.info : [httpd] : daemon successfully stopped
Mar 26 20:33:14 RT-N18U-HST user.info : [httpd] : http daemon successfully started
Mar 26 20:33:14 RT-N18U-HST user.info : [resetbutton] : daemon successfully stopped
Mar 26 20:33:14 RT-N18U-HST user.info : [resetbutton] : resetbutton daemon successfully started
Mar 26 20:33:15 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully stopped
Mar 26 20:33:15 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully started
Mar 26 20:33:16 RT-N18U-HST user.info : [wland] : daemon successfully stopped
Mar 26 20:33:16 RT-N18U-HST user.info : [wland] : daemon successfully started
Mar 26 20:33:16 RT-N18U-HST user.info : [dnsmasq] : daemon successfully stopped
Mar 26 20:33:16 RT-N18U-HST user.info : [dnsmasq] : daemon successfully started
Mar 26 20:33:16 RT-N18U-HST user.info : [unbound] : daemon successfully stopped
Mar 26 20:33:16 RT-N18U-HST user.info : [unbound] : recursive dns resolver daemon successfully started
Mar 26 20:33:16 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully stopped
Mar 26 20:33:18 RT-N18U-HST user.info : [vpn modules] : vpn modules successfully unloaded
Mar 26 20:33:18 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully started
Mar 26 20:33:19 RT-N18U-HST user.info : [sfe] : shortcut forwarding engine successfully started
Mar 26 20:33:19 RT-N18U-HST user.info : [process_monitor] : daemon successfully stopped
Mar 26 20:33:19 RT-N18U-HST user.info : [inadyn] : dynamic dns daemon successfully stopped
Mar 26 20:33:19 RT-N18U-HST user.info : [process_monitor] : successfully started
Mar 26 20:33:19 RT-N18U-HST user.info : [ddns] : inadyn daemon successfully started



_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Sat Mar 26, 2022 13:19    Post subject: Reply with quote
sysinit is probbaly a soup, between generic and router specific across the board, you can look at https://svn.dd-wrt.com/browser/src/router/services and likely other direcories for clues.
_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1855
Location: Hung Hom, Hong Kong

PostPosted: Tue Mar 29, 2022 12:10    Post subject: Reply with quote
the-joker wrote:
sysinit is probbaly a soup, between generic and router specific across the board, you can look at https://svn.dd-wrt.com/browser/src/router/services and likely other direcories for clues.

I suspect the sysinit timed out too early when starting those NAS services, making another attempt to start all NAS services NOT before killing all started NAS services, which timed out too soon again, and attempted again... so and so forth. Smile

The easy solution is not to read the source codes of sysinit, but to let users to specify the timeout value in the WEBUI.

Of course, not relying on timeout is the better approach, but you would need a way to tell whether a daemon was successfully started, and hence not to be started again. That requires reading and altering the source codes.


_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Tue Mar 29, 2022 12:53    Post subject: Reply with quote
Well you can within reason script the queries with bash to find out if a specific service is already running and than do whatever you want based on the return.

I wouldnt use admin > commands > startup, but instead save as a firewall script, maybe even calling jffs2/or usb scripts so you workaround limitations of syntax etc, when saving something as a admin > command > something script.

Reason why save as firewall script, is because startup is only excetuted at startup, while firewall scripts are executed when you click apply (causing services to restart) or at startup. (yep egc taught me that) Wink

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1855
Location: Hung Hom, Hong Kong

PostPosted: Wed Mar 30, 2022 9:50    Post subject: Reply with quote
the-joker wrote:
I wouldnt use admin > commands > startup, but instead save as a firewall script, maybe even calling jffs2/or usb scripts so you workaround limitations of syntax etc, when saving something as a admin > command > something script.

Reason why save as firewall script, is because startup is only excetuted at startup, while firewall scripts are executed when you click apply (causing services to restart) or at startup. (yep egc taught me that) Wink
I found that my "Save USB" script was executed TWICE!!! I think this deserves a new thread with serious discussion... Wink


_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Wed Mar 30, 2022 10:27    Post subject: Reply with quote
WireGuard is even starting 3 times Sad
Depending on how and what it can cause problems (if it starts before WAN is up and if you have multiple tunnels etc. )

I had to write a patch which serialize and use locking when starting WireGuard tunnels to counter these bootup problems (the patch is not in production yet).

I recently added Avahi to DDWRT Smile (also needed expat, libdaemon and DBus) so I had to dive in again in the startup, because I wanted it to run as a service and at startup etc, but it really makes your head spin.

There are so many dependencies that it is almost impossible to untangle

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Wed Mar 30, 2022 10:54    Post subject: Reply with quote
I have noticed networking is initialized at least twice on router boot, I noticed more specifically that I get the static IP to the PC Ethernet, once and then its goes off again, to unrecognized network and the second time it stabilizes and regains that IP again.

So something is definitely not right. However discussing these issues with BS, requires a great deal of patience because everything is denied a few times and then maybe there comes a patch to fix whatever, honestly I dont have the patience or time to initiate these discussions at this time in my life, due to personal issues lately which have my head spinning and my life turned inside out and upside down.

DD-WRT, I love you, but ffs, its too much, so I manage my expectations and rather not stress myself more.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
mrjcd
DD-WRT Guru


Joined: 31 Jan 2015
Posts: 6268
Location: Texas

PostPosted: Wed Mar 30, 2022 11:19    Post subject: Reply with quote
the-joker wrote:
discussing these issues with BS, requires a great deal of patience because everything is denied a few times and then maybe there comes a patch to fix whatever

hmmm ...well, at least that has not changed over the many years Twisted Evil
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum