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