While I think @mgorven get a good answer, I'd like to propose another one which kind of puts the problem into a different perspective.
If one is using
/etc/network/interfaces for configuring the network, it's possible to use it to control client OpenVPN tunnels. It goes like this:
Use custom name of the tunnel device for the OpenVPN's
dev option, for instance, have
in the OpenVPN configuration file.
Let's say the config file is
Set up an entry for that device in the
/etc/network/interfaces file, like this:
iface mytun inet manual
pre-up /etc/init.d/openvpn start client
pre-down /etc/init.d/openvpn stop client
Having set things up this way, you can now do
# /sbin/ifup mytun
# /sbin/ifdown mytun
Now back to the original question —
iface sections in the networking configuration file also support the
post-up directives which could be used for scripting the "tunnel is ready" events.
Yet another approach, for a Desktop machine, might be using a visual tool like TunTun to manage OpenVPN tunnels.