ft@0: #!/bin/sh -e ft@0: # ft@0: # rc.local ft@0: # ft@0: # This script is executed at the end of each multiuser runlevel. ft@0: # Make sure that the script will "exit 0" on success or any other ft@0: # value on error. ft@0: # ft@0: # In order to enable or disable this script just change the execution ft@0: # bits. ft@0: # ft@0: # By default this script does nothing. ft@0: ft@0: getRemoteIp () ft@0: { ft@0: ip_address=$(ifconfig eth0 | grep "inet " | awk '{ print $2 }' | cut -d ":" -f 2) ft@0: ip_netmask=$(ifconfig eth0 | grep "inet " | awk '{ print $4 }' | cut -d ":" -f 2) ft@0: remote_ip=$(ipcalc $ip_address/$ip_netmask | grep HostMin | awk '{ print $2}') ft@0: ft@0: echo $remote_ip ft@0: } ft@0: ft@0: ft@0: # Disable error exit (not usefull for this command) ft@0: #set +e ft@0: #wget -q -T 3 -t 1 -O /dev/null http://$(getRemoteIp):8080/sdvm_started ft@0: #set -e ft@0: VBoxControl guestproperty set SDVMStarted True ft@0: ft@0: ft@0: exit 0