What location are you testing the .startup script at?
Code:
133 /* SeG dd-wrt addition for module startup scripts */
134 int
135 start_modules (void)
136 {
137 runStartup ("/etc/config", ".startup");
138
139 #ifdef HAVE_RB500
140 runStartup ("/usr/local/etc/config", ".startup"); //if available
141 #elif HAVE_X86
142 runStartup ("/usr/local/etc/config", ".startup"); //if available
143 #else
144 runStartup ("/jffs/etc/config", ".startup"); //if available
145 runStartup ("/mmc/etc/config", ".startup"); //if available
146 #endif
147 return 0;
148 }
ie. for broadcom the only user locations for startup scripts is /jffs/etc/config and /mmc/etc/config _________________ Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
Joined: 22 Jun 2008 Posts: 2440 Location: Am now Dark_Shadow
Posted: Thu Feb 25, 2010 20:16 Post subject:
/jffs/etc/config is were my.startup resides. This is exactly where is resides on my 54G-TM, with the same exact script inside. 54G-TM has no problem running it every startup. My RT-N16 does not start it.
Code:
#!/bin/ash
if [ -d /tmp/www ]; then rm -rf /tmp/www; fi
ln -s /opt/www /tmp/www
Try a minimal test case using touch like in my ticket to make sure it's not a timing thing or other problem with the commands you're running. Does the script work fine when run manually? _________________ Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
_________________ Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
What location are you testing the .startup script at?
.....
ie. for broadcom the only user locations for startup scripts is /jffs/etc/config and /mmc/etc/config
Would a .startup script excute properly if the script is stored in a samba mounted /jffs/etc/config folder?
I didn't create a jffs partition on my USB-stick when implementing the "Optware the right way".
Another option would be to "steal" some NVRAM by enable jffs in the GUI I guess. Since I have an ASUS RT-N16 there should be enough space.
Would a .startup script excute properly if the script is stored in a samba mounted /jffs/etc/config folder?
I didn't create a jffs partition on my USB-stick when implementing the "Optware the right way".
Another option would be to "steal" some NVRAM by enable jffs in the GUI I guess. Since I have an ASUS RT-N16 there should be enough space.
Need to run same script as DarkShadow.
I doubt that a samba share would be mounted by the time the startup scripts are executed. Even if it is, there's no guarantee that the share will always be available.
When talking about these routers, nvram refers to a very small 32KB page of the flash memory which is separate from JFFS. JFFS is a filesystem format for using flash memory to store files in a way that reduces wear on it. Your router has plenty of flash space that is being unused, a JFFS is the best place for your scripts to go. _________________ Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
Your router has plenty of flash space that is being unused, a JFFS is the best place for your scripts to go.
Thanks for this information! I enabled jffs in the web GUI and it is visible in console. Two questions:
- I cannot create any subfolders it seems jffs is read-only. Is any additional tasks necessary (formatting?) GUI say something like 5.7 Mb space/0 available
- Is there a way to control how much memory is allocated to jffs from flash memory?
Read the wiki about JFFS. _________________ Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
I was too quick both in checking the jffs partition and posting here. Took a while to initialize. Everything OK! (and I did actually read the wiki before posting in this thread...)