[Lunar-commits] r23819 - moonbase/branches/crater/net/net-tools

Moritz Heiber moe at lunar-linux.org
Mon Mar 26 16:30:44 CEST 2007


Author: moe
Date: 2007-03-26 16:30:43 +0200 (Mon, 26 Mar 2007)
New Revision: 23819

Modified:
   moonbase/branches/crater/net/net-tools/network
Log:
Two minor adjustments. Works against static IP setups now (including
routes and all).



Modified: moonbase/branches/crater/net/net-tools/network
===================================================================
--- moonbase/branches/crater/net/net-tools/network	2007-03-26 12:53:12 UTC (rev 23818)
+++ moonbase/branches/crater/net/net-tools/network	2007-03-26 14:30:43 UTC (rev 23819)
@@ -94,7 +94,7 @@
 			if [ ! "x$WIRELESS_ESSID" == "x" ] ; then
 				$IWCONFIG $1 essid $WIRELESS_ESSID;
 			fi;
-		else
+		elif [ "$WIRELESS" == "Y" ] ; then
 			echo -n " ERROR: wireless_tools not installed!";
 			return -1;
 		fi;
@@ -148,21 +148,21 @@
 					return -1;
 				fi;
 			fi;
-		fi;
 
-	# Set a static IP if its there
-	elif [ ! "x${ADDRESS}" == "x" ] ; then
-		if [ ! "x$NETMASK" == "x" ]; then
-			NETMASK="netmask $NETMASK";
-		fi;
+		# Set a static IP if its there
+		elif [ ! "x${ADDRESS}" == "x" ] ; then
+			if [ ! "x$NETMASK" == "x" ]; then
+				NETMASK="netmask $NETMASK";
+			fi;
 
-		if [ ! "x$BROADCAST" == "x" ]; then
-			BROADCAST="broadcast $BROADCAST";
+			if [ ! "x$BROADCAST" == "x" ]; then
+				BROADCAST="broadcast $BROADCAST";
+			fi;
+
+			# If there is an address then ifconfig will be able to bring up the device anyway
+			# so no error handling here
+			$IFCONFIG $1 ${ADDRESS} $IFCONF_OPTS $NETMASK $BROADCAST up >/dev/null 2>&1;
 		fi;
-
-		# If there is an address then ifconfig will be able to bring up the device anyway
-		# so no error handling here
-		$IFCONFIG $1 ${ADDRESS} $IFCONF_OPTS $NETMASK $BROADCAST up >/dev/null 2>&1;
 	else
 		echo -n " ERROR: No address specified and DHCP not configured!";
 		return -1;



More information about the Lunar-commits mailing list