SF.net SVN: morphix: [2353] trunk/scripts-base/etc/init.d/morphix-start
[email protected] Tue, 11 Jul 2006 17:09:53 -0700
| Newsgroups | gmane.linux.morphix.cvs |
|---|---|
| Message-ID | <[email protected]> |
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.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642