Hi, here's my 2 cents ...
You must use --route-up, not --up or whatever else.
So in your config use:
--route-up "/usr/local/whatever/somescript.sh"
in "/usr/local/whatever/somescript.sh" :
#!/bin/sh
#You won't ever get access from here, give up and spawn a background process for that ...
/usr/local/whatever/ovpn-up.sh &
exit 0
in "/usr/local/whatever/ovpn-up.sh" you have 2 options, sleep 15 or more, or ping till ya get out! like below:
#!/bin/sh
#So here we are in a loop waiting for 2 things, ovpnc3(or whatever interface) to have an IP, and succesful ping out to the inet!
#sleep 15 or .... :
VPNIP=`ifconfig ovpnc3 |awk '$1 == "inet" { print $2 }'`
while ! ping -S "$VPNIP" -c 1 8.8.8.8; do
#echo "Waiting for VPNIP : "$VPNIP" - network interface might be down..."
sleep 2
VPNIP=`ifconfig ovpnc3 |awk '$1 == "inet" { print $2 }'`
done
#any code after here should work
exit 0
Good luck !
-TD