Like every other website on the planet, SmallNetBuilder uses cookies. Our cookies track login status, but we only allow admins to log in anyway, so those don't apply to you. Any other cookies you pick up during your visit come from advertisers, which we don't control.
If you continue to use the site, you agree to tolerate our use of cookies. Thank you!

Wi-Fi Router Charts

Click for Wi-Fi Router Charts

Mesh System Charts

Click for Wi-Fi Mesh System Charts

Adding the Custom Script

Now it is time to make our new rc.custom file real. No longer will we have to execute the telnet.cgi program to turn on telnet, and we won't have to run our NFS and mt-daapd scripts by hand either. One last time, enable telnet and log in. Find your rc.custom script and update it to call your scripts that we created in the last two articles.

To make telnet permanent, we'll have to put a telnet entry in the /etc/inittab file. Since I don't use SMB filesystems anymore, my script deletes the daemons from the RAM disk. This is not a permanent deletion, it just deletes the executables off of the RAM disk to save space. If I decide to use them again, I'll just comment out my deletions. Remember that any commands you put in this file must either run in the background or finish quickly, otherwise the boot process will hang up.

Here's my rc.custom file :

/usr/bin/Set_Led beep1
# setup inetd for telnet
echo "telnet stream tcp nowait root /usr/sbin/telnetd" >>/etc/inetd.conf
# delete these daemons to save some space
# if you use smb filesystems, comment out these lines
rm -f /usr/sbin/smb*
rm -f /usr/sbin/nmbd
# start NFS
rm -f /etc/exports
ln -s /share/hdd/conf/etc/exports /etc/exports
# start up the iTunes server

If you mess something up in this file, it may still have an effect on the system, but it can be fixed by editing the file. You won't have to modify Flash. If worse comes to worst and your changes cause the box not to boot properly, you'll need to mount the disk in an external system to fix it. If you're careful, you shouldn't have any problems.

After you make the above changes, reboot one more time. This time when the box comes back up, you should be able to telnet in without having to run the telnet.cgi program. Your NFS server should be running and mt-daapd will be busy scanning the hard drive for music files.

Now that we've show how to install new software and create a custom Flash, what's next? Lots. We've created our own custom Flash, but the larger development community is way ahead of us. A worldwide community of NSLU2 developers has sprung up and they are working on a custom Flash that doesn't require a RAM disk. The advantage of this is that it frees up 10 megaBytes of RAM. That's a lot on a 32 MegaByte system. Freeing up that memory will allow us to run even more sophisticated programs.

In Part 5, I'll introduce you to the Unslung firmware that is the next step in the evolution of this little box into a general-purpose Open Source application platform.

Support Us!

If you like what we do and want to thank us, just buy something on Amazon. We'll get a small commission on anything you buy. Thanks!

Don't Miss These

  • 1
  • 2