The following set of commands give a simple /etc/rc system initialization. This file needs to be set to be executable; chmod 755 rc. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #!/bin/bash # A very simple startup script, put together by a non-expert. # Modify for your own purposes. 2/1/03 B.D.D. mount -n -t proc /proc /proc #be sure root filesystem is ro for fsck mount -n -o remount,ro / # check the root partition; it supposed to be mounted read only at this point /sbin/fsck -f -a -T -C / #remount root filesystem rw and with the no access time option mount -n -o remount,rw,noatime / # clear mtab >/etc/mtab #reenter mtab entries /bin/mount -f / /bin/mount -f /proc #mount everything else /bin/mount -a rm /var/log/messages touch /var/log/messages /sbin/syslogd -m 0 #Set the date to the last saved value #/bin/date $(cat /msdos/date.txt) /bin/hostname small # Start ethernet/tcp /etc/rc.inet #/bin/loadkeys /etc/keys #/usr/sbin/fbset -a 2bpp /usr/bin/reset -Q #disable cron unless you need it to save memory #/usr/sbin/cron #set a sleep after 5 minute idle echo 600 > /proc/psionw/sleep %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% The following set of commands is an example of an /etc/rc.inet script for setting up ethernet. This file needs to be set to be executable "chmod 755 rc.inet" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #!/bin/sh #This is /etc/rc.inet - Configure the TCP/IP interfaces #Edit it to use your ethernet configuration. #Hostname is set already ifconfig lo 127.0.0.1 # uses default netmask 255.0.0.0 route add -net 127.0.0.0 netmask 255.0.0.0 dev lo # a route to point to the loopback device IPADDR="192.168.37.98" # REPLACE with your IP address NETMASK="255.255.255.0" # REPLACE with your subnet mask NETWORK="192.168.37.0" # REPLACE with your network address BROADCAST="192.168.37.255" # REPLACE with your broadcast address GATEWAY="192.168.37.99" # REPLACE with your default gateway address #ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST} #route add -net ${NETWORK} netmask ${NETMASK} dev eth0 #route add default gw ${GATEWAY} metric 1 #xinetd is rather heavy on resources - disk and memory #xinetd -stayalive -reuse -pidfile /var/run/xinetd.pid #start the daemon inetd %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%