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
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 :
#!/bin/sh /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 /share/hdd/conf/rc.d/rc.portmap /share/hdd/conf/rc.d/rc.nfsd # start up the iTunes server /share/hdd/conf/rc.d/rc.mt-daapd
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
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.