Debugging Windows based server scripts
Hi,
due to not being allowed to have scripts "echo data" to the log file under Windows, debugging scripts is next to impossible.
I presume there are no compile time options to enable "echo" under Windows ?
Could anybody provide me with a patch to enable "echo" just for the purpose of debugging ?
I would like the patch to work for Openvpn 2.5
I understand the risks and I am not distributing OpenVPN binaries.
As justification I make these points:
* Any large distributor of Openvpn binaries could make the change to enable "echo" under Windows.
* That distributor could then abuse it as they please.
* I am simply asking for help for the purpose of debugging Open Source Software made for the community.
Thanks.
R
Hi,
Quoted 17 lines · tincanteksup
Hi,
due to not being allowed to have scripts "echo data" to the log file under Windows, debugging scripts is next to impossible.
I presume there are no compile time options to enable "echo" under Windows ?
Could anybody provide me with a patch to enable "echo" just for the purpose of debugging ?
I would like the patch to work for Openvpn 2.5
I understand the risks and I am not distributing OpenVPN binaries.
As justification I make these points:
Quoted 7 lines
* Any large distributor of Openvpn binaries could make the change to enable "echo" under Windows.
* That distributor could then abuse it as they please.
* I am simply asking for help for the purpose of debugging Open Source Software made for the community.
If it's for debugging, why not redirect the output of the scripts? There are several ways of doing this like:
(i) replace the script by a wrapper
@echo off
rem this wrapper calls the actual up_script_orig.bat call up_script_orig.bat >up_script.log 2>&1 exit /b
(ii) move the script to a function and call it, redirecting o/p
@echo off
call :do_work >up_script.log 2>&1
exit /b
:do_work
@echo on
@rem the original script follows..
....
....
@rem end of script
@echo off
exit /b
Selva
Quoted 55 lines · Selva Nair
Hi,
Quoted 17 lines · tincanteksup
Hi,
due to not being allowed to have scripts "echo data" to the log file under Windows, debugging scripts is next to impossible.
I presume there are no compile time options to enable "echo" under Windows ?
Could anybody provide me with a patch to enable "echo" just for the purpose of debugging ?
I would like the patch to work for Openvpn 2.5
I understand the risks and I am not distributing OpenVPN binaries.
As justification I make these points:
Quoted 7 lines
* Any large distributor of Openvpn binaries could make the change to enable "echo" under Windows.
* That distributor could then abuse it as they please.
* I am simply asking for help for the purpose of debugging Open Source Software made for the community.
If it's for debugging, why not redirect the output of the scripts? There are several ways of doing this like:
(i) replace the script by a wrapper
@echo off
rem this wrapper calls the actual up_script_orig.bat call up_script_orig.bat >up_script.log 2>&1 exit /b(ii) move the script to a function and call it, redirecting o/p
@echo off
call :do_work >up_script.log 2>&1
exit /b:do_work
@echo on
@rem the original script follows..
....
....
@rem end of script
@echo off
exit /b
Quoted 2 lines
Selva
Hi Selva, thanks for the suggestions and, as it turns out, reminders! It has been quite some time since I picked a fight with Windows batch. I have now, at last, got past the first hurdle ..this "blackbox" is starting to look a little less opaque ;-)
R
Re: [Openvpn-devel] TLS Crypt v2 metadata name from openvpn
Hi,
minor follow up.
This is not exactly a bug because it does work fine.
However, this is the 'metadata_file' name as presented to Windows:
metadata_file=C:\Users\IEUser\AppData\Local\Temp\\openvpn_tls_crypt_v2_metadata__3a06867f5bcca86b.tmp
Note: Temp\\openvpn_
R