Shutdown Script For Asus WL-500W With Oleg Firmware

If you have an Asus WL-500W, the DIYers’ favourite wireless router, and have installed the Oleg custom firmware on it, then you would have set up a shutdown script for it, that allows your router to shut down gracefully. This is especially important if you have a USB hard disk attached to it. There are many such scripts available in Oleg’s firmware that you can tweak. All of these reside in “/usr/local/sbin/”. The one that we are going to talk about today is named “pre-shutdown” and it is exceuted just before the router is about to shutdown. Here is my script that will stop all the programs that have been started, finalizes all data accesses for the hard drive, unmounts all the partitions and if they can’t be unmounted, then mounts them as read only to reduce the risks, and then allows the router to continue shutdown. Although this script is written for Asus WL-500W but it will work with most other routers that use oleg or unslung firmware (like Linksys NSLU2, Asus WL-500G, WL-500gP etc):

[TIP] Add Directories Recursively To Perforce (P4) Depot

Perforce is an excellent revision control system for the code but the GUIs (P4WIN and P4V) are too slow to be productive. Hence, I like to do most of my work through command lines. Now, the other day I needed to add a directory and all its subdirectories and files to the repository (or perforce depot). This is a trivial task through the GUI. Just drag the top level directory onto the changelist area and the GUI takes care of everything but there is no straightforward way to do this through command line, until, I discovered the “-x” option of P4. So, here it is how to achieve this. Run the following command after cd’ing to the directory you want to add:

Project: My WordPress Plugin Shantz WP Prefix Suffix Updated to 1.1.4

Here comes another update, and this time it is a majorly recommended one. For those who are still living under a rock (just kidding :P), this is a plugin that allows you to add any kind of text/html/css/php/javascript code to any of your posts or pages with lots of controls over what to display, where to display, etc etc. So, you could use it as an ad-manager or a copyright notice adder (to thwart those feed scrapers) or just add some friendly messages or related posts, etc for your readers.

Secure Access To Your DSL Modem’s Telnet (telnet / ssh)

I have one of those crappy DSL modems that all these ISPs give to you with the connection. My ISP is Airtel and the modem that I have is Beetel 110-BXi (They also have other models like 220-BX and 220 BXi). One thing common among all these modems is that they do not provide secure access like Secure Shell (ssh) as all they provide is ftp/telnet/http etc which are all clear text protocols. Hence, it is a huge security risk to expose these interfaces to the internet and then access them from outside. So, I (and most others) don’t allow these services to be accessed from WAN. But I do have the need some time to access it. So, what do I do? I follow a simple process to allow myself a pseudo-ssh or telnet picggy-backed over ssh connection. How is that?

[TIP] Install Twonky on Asus WL-500W with stock firmware

Asus WL-500W is a greate wi-fi router with lots of features, one of them being able to use it as a media server to serve movies/songs over your network from a hard disk connected directly to it through USB. But the media server that is included in the official firmware leaves a lot to be desired. If you are a fan of twonky, all you would have heard so far would have been that to use it on your router, you’d have to change your firmware over to a non-official one. If you do not want to take any risks with the custom firmwares, I’ll tell you a simple way to use twonky with the stock firmware itself. Follow these steps: