#!/bin/sh -q # # system startup. echo Executing the /etc/rc script #Set the date to January 1, 1970. This corresponds to a time of 1 #TODO: fix kernel to read master card's clock chip date 010100011970 # Keep the watchdog timer kicked for 15 minutes then, if nothing else is kicking # it reset /root/watchdog -f /dev/watchdog -s 7 -n 129& #/root/watchdog -f /dev/watchdog -s 7& # set up the hostname hostname netcc.sedsystems.ca echo "Configuring loopback connector" sbin/ifconfig lo 127.0.0.1 route add -net 127.0.0.0 netmask 255.0.0.0 lo echo "Configuring eth0" sbin/ifconfig eth0 198.169.180.132 broadcast 198.169.180.255 netmask 255.255.255.0 route add -net 198.169.180.0 netmask 255.255.255.0 eth0 route add -net 192.107.131.0 netmask 255.255.255.0 eth0 /sbin/expand -s /ramfs.img /dev/ram0 mount -t ext2 /dev/ram0 /var mkdir /var/tmp mkdir /var/run touch /var/run/utmp mkdir /var/log touch /var/log/wtmp rmdir /var/lost+found mkdir /var/sios mkdir /var/sios/own echo "DO NOT change this directory, it is used by the application." > /var/sios/own/README mount -t jffs -o ro /dev/flash2 /sios mount -t proc proc /proc /sbin/insmod adc /sbin/insmod chipselect /sbin/insmod digital_input /sbin/insmod digital_output ledTestTime=2 twoMask=0xAAAA threeMask=0xAAAA /sbin/insmod analog_input /sbin/insmod siosmisc /sbin/insmod gpib sleep 2 echo "H" > /dev/sios/digitaloutput30 echo "H" > /dev/sios/digitaloutput31 sleep 1 echo "L" > /dev/sios/digitaloutput30 #One of these is the enable line, the other is the open all line. The application will turn #off the open all line. # start up the internet superserver echo "Starting internet superserver" /sbin/inetd & /sios/sios -f /sios/sios.cfg -d warning -w /dev/watchdog& exit