What's new
  • 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!

RT-AC68u Script worries.

Cyanix

Occasional Visitor
Good morning.

After following a few tutorials on how to add scripts to the JFFS partition, i must admit i'm pretty much lost.

Basically, i want to tweak the buffer size of my Router and check the impact on streaming/gaming/whatever.

Here's what i've learned so far:

-Use putty to access the router via Telnet/SSH -ok
-Access the /jffs/Scripts "folder" -ok


-Use vi (text editor) to create the scripts in the /jffs/scripts folder

Nope, just nope. -ko

And like any Linux script, they need to start with a shebang:

#!/bin/sh

Ok i got that. I'm supposed to start the script with this line, now am I.
Now lets suppose i put up something like this:

#!/bin/sh
ifconfig eth0 txqueuelen 2
ifconfig eth1 txqueuelen 2

Don't forget to set any script you create as being executable:

chmod a+rx /jffs/scripts/*

Yeah, i've heard that. But where ? when ? is it a command ? a line i should insert at the start of my script ?

How do i create the correct "file"
How do i run it ?
How can i check my script has been correctly executed ?
Is there a Telnet command to check a list of scripts stored in /jffs/Scripts "folder" ?

I cannot seem to save this script under VI like i'd do it with a regular text editor (Notepad++ comes to mind) and to be honest, i'd rather not use this program which reminds me of my stone-age Cobol days i'd rather forget about...

I just want to run a simple script, check the results, and revert the process if those results aren't to my liking. DD-WRT and Tomato allow me to run scripts without much hassle but the performance isnt up to par with Merlin.
 
-Access the /jffs/Scripts "folder" -ok
Everything is case sensitive, so it's /jffs/scripts not /jffs/Scripts
-Use vi (text editor) to create the scripts in the /jffs/scripts folder
Nope, just nope. -ko
You're right, vi is horrible that's why nano is now included on the router as well. Alternatively you could use WinSCP and do it all remotely from Windows.
Don't forget to set any script you create as being executable:

chmod a+rx /jffs/scripts/*

Yeah, i've heard that. But where ? when ? is it a command ? a line i should insert at the start of my script ?
Just type the chmod command above exactly as it is into the router's command line. That will make all scripts executable.
How do i create the correct "file"
How do i run it ?
Look at the wiki.
How can i check my script has been correctly executed ?
Look in the syslog.
Is there a Telnet command to check a list of scripts stored in /jffs/Scripts "folder" ?
ls
I cannot seem to save this script under VI like i'd do it with a regular text editor (Notepad++ comes to mind) and to be honest, i'd rather not use this program which reminds me of my stone-age Cobol days i'd rather forget about...
What do you mean? :p IDENTIFICATION DIVISION., ENVIRONMENT DIVISION., DATA DIVISION., PROCEDURE DIVISION. Add some JCL and you're done. :D
 

Similar threads

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!
Back
Top