[aadk-commits] qwell: uClinux/trunk r401 - /uClinux/trunk/uClinux-dist/vendors/Digium/S800I/rc

aadk-commits at lists.digium.com aadk-commits at lists.digium.com
Thu Apr 26 13:15:15 MST 2007


Author: qwell
Date: Thu Apr 26 15:15:15 2007
New Revision: 401

URL: http://svn.digium.com/view/aadk?view=rev&rev=401
Log:
Remove all of the networking logic from rc script, and call an external script to handle it all.

The script it calls comes from the GUI

Modified:
    uClinux/trunk/uClinux-dist/vendors/Digium/S800I/rc

Modified: uClinux/trunk/uClinux-dist/vendors/Digium/S800I/rc
URL: http://svn.digium.com/view/aadk/uClinux/trunk/uClinux-dist/vendors/Digium/S800I/rc?view=diff&rev=401&r1=400&r2=401
==============================================================================
--- uClinux/trunk/uClinux-dist/vendors/Digium/S800I/rc (original)
+++ uClinux/trunk/uClinux-dist/vendors/Digium/S800I/rc Thu Apr 26 15:15:15 2007
@@ -4,8 +4,8 @@
 mount -t ramfs none /ramfs
 ( cd / ; gzip -dc ramfs.tgz | tar xf - -C ramfs/ )
 
-# parse configuration arguments passed to ucLinux
-#	Pull info from init process environ
+# Parse configuration arguments passed to uClinux
+# Pull info from init process environ
 BOARDREV=`cat /proc/1/environ | grep boardrev`
 echo $BOARDREV
 if [ "" != "$BOARDREV" ]; then 
@@ -41,11 +41,9 @@
 	( cd / ; gzip -dc etc/defaults.tgz | tar xf - )
 	echo "Using Defaults!"
 fi
-. /etc/rc-network
+
 export PS1="[\\u@\\h \\w]\$ "
 
-hostname ${HOSTNAME}
-dhcpcd &
 modprobe bfin_cf_pcmcia
 modprobe orinoco_cs
 modprobe ide-cs
@@ -53,72 +51,11 @@
 
 # mount sysfs to get access to i2c devices
 mount -t sysfs none /sys
-#mount devpts to allow for use of UNIX98 pty's 
+#mount devpts to allow for use of UNIX98 pty's
 mount -t devpts none /dev/pts
-		
-echo -n "Looking for IP address..."
 
-for i in `seq 20 -1 0`; do
-	echo -n "$i.." 
-	sleep 1
-	IPADDR=`/sbin/ifconfig eth0 | grep "inet addr" | cut -d ':' -f 2 | cut -d ' ' -f 1`
-	if [ "$IPADDR" != "" ]; then
-		echo "Found"
-		break;
-	fi
-done
+. /etc/asterisk/scripts/networking.sh
 
-if [ "$IPADDR" = "" ]; then
-	echo "Failed"
-	if iwconfig eth2 | grep IEEE; then
-		echo -n "Trying wireless..."
-		killall dhcpcd
-		ifconfig eth0 down
-		if [ "$ESSID" != "" ]; then
-			iwconfig eth2 essid "$ESSID"
-		fi
-		if [ "$WEPKEY" != "" ]; then
-			iwconfig eth2 enc "$WEPKEY"
-		fi
-		dhcpcd eth2 &
-		for i in `seq 20 -1 0`; do
-			echo -n "$i.." 
-			sleep 1
-			IPADDR=`/sbin/ifconfig eth2 | grep "inet addr" | cut -d ':' -f 2 | cut -d ' ' -f 1`
-			FOUNDESSID=`/sbin/iwconfig eth2 | grep ESSID | cut -d ':' -f 2 | cut -d \" -f 2`
-			if [ "$IPADDR" != "" ]; then
-				echo "Found (ESSID $FOUNDESSID)"
-				break;
-			fi
-		done
-	else
-		echo "No wireless found..."
-	fi
-fi
-if [ "$IPADDR" != "" ]; then
-	echo "Found - $IPADDR"
-	BLOCK=`echo $IPADDR | cut -d '.' -f 1-3`
-	echo "IP Block is $BLOCK"
-	if [ "$BLOCK" = "$SUBBLOCK" ]; then
-		echo "Configuring for alternate sub block.";
-		USEALT="yes"
-		. /etc/rc-network
-	else
-		echo "Existing sub block ${SUBBLOCK} is fine."
-	fi
-fi
-
-ifconfig lo 127.0.0.1
-ifconfig eth1 ${LOCALIP}
-echo ${LOCALIP} ${HOSTNAME} > /etc/hosts
-makeiplist ${LOCALIP} ${DHCPSTART} ${DHCPCOUNT}
-if [ "$SSHACCESS" = "yes" ]; then
-	inetd &
-fi
-udhcpd &
-dnsmasq &
-echo 1 > /proc/sys/net/ipv4/ip_forward
-iptables -t nat -A POSTROUTING -s ${NETWORK}/${NETMASK} -d 0.0.0.0/0 -j MASQUERADE
 #cat /etc/issue
 OPTS=""
 if [ "$OPERMODE" != "" ]; then



More information about the aadk-commits mailing list