Saturday, March 14, 2009

Starting a script after NetworkManager

I need to access a VPN. But to be able to start the VPN I need a network connection. How to know when NetworkManager has already created your connection? By refering to here, you can add scripts into the /etc/NetworkManager/dispatcher.d to be run by network manager everytime an interface go up or down.



if [ "$STATUS" = "up" ]; then
/etc/rc.d/openvpn start
/etc/rc.d/openvpn stop

So that openvpn will start straight away whenever any interface (IF) has the status up.


lxe said...

This does not work for me. Running NM 0.7.996, does this method still work (am I doing something wrong) or have newer builds (since you posted) broken this functionality?

Abdullah Zainul Abidin said...

Maybe this might be of help?

Haiya ala Solah