|
|
On Wed, 1 Sep 2004, Mathias Sundman wrote: > On Tue, 31 Aug 2004, Dominik Friberg :: friibii wrote: > > > hi mathias > > > > i took a look at your gui for openvpn, and am still hopefull that it can > > help me, but i don't find the way. > > > > I want to start a connection, and then, automaticly execute another > > program (windows net) for linking a samba-directory to a windows-path. > > Is there a possibilty to do that? ( i tried with a cmd shell but after > > executing the gui he stops and i'me not the windows crack.. > > This is exactly what I tried to accomplish about a week ago when I posted > to the openvpn-users list with the following topic: > > Subject: execute script to map drives after connecting > > I tried to execute a script from --route-up to do this, but failed. My > conclusion was that it can't be done from route-up, as OpenVPN is not > passing any packets while waiting for the route-up script to finish. > > James, can you confirm that this is the case? > > I think it should be solved by introducing an other "run-script" option in > OpenVPN that is executed about the same time as the "Initialization > Sequence Completed", and as a diffrent process/thread. (search the archive > about the above thread for more info.). (Or perhaps the --route-up option > can be modified to work this way, but that might have other consequences > on the current usage of that option.) > > James, do you agree with this, or do you think it should be handled > outside of OpenVPN? The --route-up script is executed after the TUN/TAP interface comes up, just before the "Initialization Sequence Completed" point. The problem is that the script is run using the system() call which is synchonous. It might make sense to have another script which is asynchronously called after the "Initialization Sequence Completed" message is output. In order to do that we would need a portable, asynchronous version of system(). You can also, of course, include a command in the --route-up script to asynchronously execute another script then return immediately. This will solve the problem of the script locking up the OpenVPN event loop. James ____________________________________________ Openvpn-users mailing list Openvpn-users@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/openvpn-users |