From: <ale...@us...> - 2006-07-12 00:09:54
|
Revision: 2353 Author: alextreme Date: 2006-07-11 17:09:49 -0700 (Tue, 11 Jul 2006) ViewCVS: http://svn.sourceforge.net/morphix/?rev=2353&view=rev Log Message: ----------- * adding a few network-related bootoptions which have been bugging me for some time Modified Paths: -------------- trunk/scripts-base/etc/init.d/morphix-start Modified: trunk/scripts-base/etc/init.d/morphix-start =================================================================== --- trunk/scripts-base/etc/init.d/morphix-start 2006-07-11 22:50:49 UTC (rev 2352) +++ trunk/scripts-base/etc/init.d/morphix-start 2006-07-12 00:09:49 UTC (rev 2353) @@ -895,6 +895,32 @@ done fi +#### +# +# Bootoptions for setting the networkaddress at boottime +# (useful for networks without DHCP) +# +# ip=XXX.XXX.XXX.XXX +# gateway=XXX.XXX.XXX.XXX +# dns=XXX.XXX.XXX.XXX +# +# +#### + +ETHIPADDR="$(getbootparam ip)" +ETHGW="$(getbootparam gateway)" +ETHDNS="$(getbootparam dns)" + +if [ -n "$ETHIPADDR" ]; then + ifconfig eth0 $ETHIPADDR +fi +if [ -n "$ETHGW" ]; then + route add default gw $ETHGW +fi +if [ -n "$ETHDNS" ]; then + echo "nameserver $ETHDNS" >> /mnt/main/etc/resolv.conf +fi + # If not using usb as /cdrom, also check the mounted /mnt/usb for # DCE directories This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |