No.scgf wrote:Is this a riddle?
There is no secret.scgf wrote:Why a secret?
And this is very very well explained in the docs, which you should have read.scgf wrote:All I need to know is what to do to keep the adblock.conf file over a reboot.
You keep repeating to your students the very things you have told them to read in their textbook, which they have obviously refused to read?scgf wrote:I am a teacher and am exasperated with the way hackers and Linux gurus hide their knowledge behind riddles and 'read this' and 'read that'. I have run a Linux box for some years and have learned a lot but sometimes it is just too difficult. When my students at school ask for help I give the help which is suitable for that individual - I don't respond with a riddle.
Because we did not invent the term RTFM. We have taken the time to write the docs so that we don't have to keep repeating the same thing over and over again in the forum. This adds nothing but noise to the forum. If we have taken the time to write the docs, the least that anyone could do is to take the time to read them BEFORE posting to ask a question. No apologies from this side.scgf wrote:Why is it so difficult to just tell me what to do?
To bring some perspective to your exasperation, this is from the docs;
features.html wrote: 10. Auto execution of shell scripts at bootup. This requires entries in the bootloader environment. If there is any entry in the bootloader environment that points to a shell script (i.e., ending with the extension ".sh") that shell script will be executed everytime the router boots up. There is a default "autoexec.sh" provided, which just runs any commands passed to it (there are also autoexec1.sh to autoexec7.sh, which do the same thing).
37. Facility for executing commands on bootup - by "RT_cmd_x" entries in the environment ("x") stands for a number or some other distinguishing letter/number: e.g.,
setenv RT_cmd_1 "rshaperctl 192.168.1.6 32768" (will execute "rshaperctl 192.168.1.6 32768" during bootup - at the tail end of the boot process)
38. Facility for executing commands at the earliest stages of bootup - by "RT_init_x" entries in the environment ("x") stands for a number or some other distinguishing letter/number: e.g.,
setenv RT_init_1 "mount -t minix /dev/mtdblock/5 /nvram" (will execute "mount -t minix /dev/mtdblock/5 /nvram" very early in the boot process - and long before the commands loaded via RT_cmd_x)
54. Ad blocking, through adblock.sh and adblock_multi.sh. For this purpose, adblock.sh downloads and converts one of a number of common internet resources ("small", "medium", "large", or "xlarge") of ad servers to be blocked. The largest of these uses a lot of cpu cycles on the router (about 20%) - but since the router's cpu is largely idle most of the time, this is not a major issue. The smallest consumes only about 5% cpu cycles. Run adblock.sh with no parameters to see the syntax. adblock_multi.sh is a shell to adblock.sh, allowing it to download more than one of the internet lists at once (e.g., "adblock_multi.sh exit small large"). Note that, for routers with low memory (i.e., 8mb RAM), you should never use "large" or "xlarge". In fact, "small" is the only one that such routers will be able to cope with. If you try to download more lists than your free memory can cope with, your router WILL crash!
NOTE: you MUST always run "adblock.sh exit" to remove the adblock features from memory, before any attempt to upgrade the firmware.
history.html wrote: 15. New shell scripts: adblock.sh and adblock_multi.sh - to assist in blocking popup adverts by means of "dns poisoning". It is basically obsolete if you can use Firefox and adblock plus - but otherwise (e.g., if using IE) it is very useful. Advantages [a] it only needs to be implemented once - on the router - and all clients would benefit from the ad blocking, etc it works with all browsers such such as IE which don't have adblock [c] some of the hosts in the hosts block lists do some of what tinyproxy could have achieved, re: parental control. For this purpose, adblock.sh downloads and converts one of a number of common internet resources ("small", "medium", "large", or "xlarge") of ad servers to be blocked. The largest of these uses a lot of cpu cycles on the router (about 20%) - but since the router's cpu is largely idle most of the time, this is not a major issue. The smallest consumes only about 5% cpu cycles. Run adblock.sh with no parameters to see the syntax. adblock_multi.sh is a shell to adblock.sh, allowing it to download more than one of the internet lists at once (e.g., "adblock_multi.sh exit small large"). Note that, for routers with low memory (i.e., 8mb RAM), you should never use "large" or "xlarge". In fact, "small" might be the only one that such routers will be able to cope with. If you try to download more lists than your free memory can cope with, your router WILL crash!
NOTE: you MUST always run "adblock.sh exit" to remove the adblock features from memory, before any attempt to upgrade the firmware.
16. New environment variable: adblock - use this to schedule adblock_multi.sh to run when a WAN connection is made. The values should be the parameters that you wish to pass to adblock_multi.sh (e.g., setenv adblock "exit medium xlarge"). On routers with 8mb RAM, you should only supply "small" - do NOT try to use the medium/large/xlarge lists on such routers.
faq.html wrote: Q. I have some specific needs and want some things to happen on the router everytime it is booted. How do I do this?
A. Use the "autoexec.sh" feature (remember to reboot the router afterwards):
e.g.,
setenv autoexec.sh "wget http://fpp.com/bar.sh -P /var && chmod a+x /var/bar.sh && /var/bar.sh"
This will set up the router to fetch a script (bar.sh) from a website, set its executable flag, and then run it, everytime the router boots up.
OR
Use the "RT_cmd_n" feature (remember to reboot the router afterwards):
e.g.,
setenv RT_cmd_1 "mount -t minix /dev/mtdblock/5 /nvram"
This will set up the router to mount an mtd5 that you have created and converted to a minix filesystem at the mountpoint /nvram
OR
Use the "RT_init_n" feature (remember to reboot the router afterwards):
e.g.,
setenv RT_init_1 "mount -t minix /dev/mtdblock/5 /nvram"
This will set up the router to mount an mtd5 that you have created and converted to a minix filesystem at the mountpoint /nvram
OR
If you are a Windows user, then you can write script to be stored on your PC and then use a Windows telnet scripter to run the script each time you restart the router.
The "RT_init_n" commands are executed very early in the boot process. The "RT_cmd_n" commands are executed after most things have been loaded (towards the end of initialisation) and the "autoexec.sh" commands are executed at the tail end - normally after a WAN connection has been achieved, or the firmware has timed out from waiting for a WAN connection.
Bottom line: if you had bothered to read the docs, you would not have been exasperated at all - and neither would any of those who ask questions without first reading the docs. Presumably, we should resort to doing all this copying and pasting everytime someone prefers to not read the docs?