mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	Conflicts: api/src/com/cloud/api/ApiConstants.java api/src/com/cloud/api/BaseCmd.java api/src/com/cloud/api/ResponseGenerator.java api/src/com/cloud/api/commands/ListNetworksCmd.java api/src/com/cloud/api/response/NetworkResponse.java api/src/com/cloud/event/EventTypes.java api/src/com/cloud/network/NetworkService.java client/tomcatconf/commands.properties.in scripts/network/domr/getDomRVersion.sh scripts/network/domr/ipassoc.sh scripts/network/domr/l2tp_vpn.sh scripts/network/domr/networkUsage.sh scripts/network/domr/router_proxy.sh server/src/com/cloud/api/ApiDBUtils.java server/src/com/cloud/api/ApiResponseHelper.java server/src/com/cloud/configuration/DefaultComponentLibrary.java server/src/com/cloud/network/NetworkManagerImpl.java server/src/com/cloud/network/dao/IPAddressDao.java server/src/com/cloud/network/dao/IPAddressDaoImpl.java setup/apidoc/gen_toc.py setup/db/create-schema.sql wscript
		
			
				
	
	
		
			59 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			59 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash
 | 
						|
# Licensed to the Apache Software Foundation (ASF) under one
 | 
						|
# or more contributor license agreements.  See the NOTICE file
 | 
						|
# distributed with this work for additional information
 | 
						|
# regarding copyright ownership.  The ASF licenses this file
 | 
						|
# to you under the Apache License, Version 2.0 (the
 | 
						|
# "License"); you may not use this file except in compliance
 | 
						|
# with the License.  You may obtain a copy of the License at
 | 
						|
# 
 | 
						|
#   http://www.apache.org/licenses/LICENSE-2.0
 | 
						|
# 
 | 
						|
# Unless required by applicable law or agreed to in writing,
 | 
						|
# software distributed under the License is distributed on an
 | 
						|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 | 
						|
# KIND, either express or implied.  See the License for the
 | 
						|
# specific language governing permissions and limitations
 | 
						|
# under the License.
 | 
						|
 | 
						|
 | 
						|
 | 
						|
# used as a proxy to call script inside virtual router 
 | 
						|
 | 
						|
#set -x
 | 
						|
 | 
						|
check_gw() {
 | 
						|
  ping -c 1 -n -q $1 > /dev/null
 | 
						|
  if [ $? -gt 0 ]
 | 
						|
  then
 | 
						|
    sleep 1
 | 
						|
    ping -c 1 -n -q $1 > /dev/null
 | 
						|
  fi
 | 
						|
  if [ $? -gt 0 ]
 | 
						|
  then
 | 
						|
    exit 1
 | 
						|
  fi
 | 
						|
}
 | 
						|
 | 
						|
cert="/root/.ssh/id_rsa.cloud"
 | 
						|
 | 
						|
script=$1
 | 
						|
shift
 | 
						|
 | 
						|
domRIp=$1
 | 
						|
shift
 | 
						|
 | 
						|
check_gw "$domRIp"
 | 
						|
 | 
						|
ssh -p 3922 -q -o StrictHostKeyChecking=no -i $cert root@$domRIp "/opt/cloud/bin/$script $*"
 | 
						|
exit $?
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 |