mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	Don't capture stderr, this will return an error when the runscript command expects null when there is no default route.
This commit is contained in:
		
							parent
							
								
									71dc43ebb0
								
							
						
					
					
						commit
						795366019b
					
				| @ -199,7 +199,7 @@ public class NetUtils { | ||||
| 
 | ||||
|     public static String getDefaultEthDevice() { | ||||
|         if (SystemUtils.IS_OS_MAC) { | ||||
|             String defDev = Script.runSimpleBashScript("/sbin/route -n get default | grep interface | awk '{print $2}'"); | ||||
|             String defDev = Script.runSimpleBashScript("/sbin/route -n get default 2> /dev/null | grep interface | awk '{print $2}'"); | ||||
|             return defDev; | ||||
|         } | ||||
|         String defaultRoute = Script.runSimpleBashScript("/sbin/route | grep default"); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user