From 6f14c9f83cab300be25401fd3bf3727100487b21 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sat, 27 Feb 2016 14:21:53 +0100 Subject: [PATCH] Clarify that scripts are called synchronously. --- doc/tinc.conf.5.in | 11 ++++++++++- doc/tinc.texi | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/doc/tinc.conf.5.in b/doc/tinc.conf.5.in index d1b26730..2a1a09bf 100644 --- a/doc/tinc.conf.5.in +++ b/doc/tinc.conf.5.in @@ -556,7 +556,15 @@ UDP is possible or not. .Sh SCRIPTS Apart from reading the server and host configuration files, tinc can also run scripts at certain moments. -Under Windows (not Cygwin), the scripts should have the extension +Below is a list of filenames of scripts and a description of when they are run. +A script is only run if it exists and if it is executable. +.Pp +Scripts are run synchronously; +this means that tinc will temporarily stop processing packets until the called script finishes executing. +This guarantees that scripts will execute in the exact same order as the events that trigger them. +If you need to run commands asynchronously, you have to ensure yourself that they are being run in the background. +.Pp +Under Windows (not Cygwin), the scripts must have the extension .Pa .bat . .Bl -tag -width indent .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-up @@ -564,6 +572,7 @@ This is the most important script. If it is present it will be executed right after the tinc daemon has been started and has connected to the virtual network device. It should be used to set up the corresponding network interface, but can also be used to start other things. +.Pp Under Windows you can use the Network Connections control panel instead of creating this script. .It Pa @sysconfdir@/tinc/ Ns Ar NETNAME Ns Pa /tinc-down This script is started right before the tinc daemon quits. diff --git a/doc/tinc.texi b/doc/tinc.texi index 608077f1..2edf4271 100644 --- a/doc/tinc.texi +++ b/doc/tinc.texi @@ -1256,7 +1256,15 @@ UDP is possible or not. @cindex scripts Apart from reading the server and host configuration files, tinc can also run scripts at certain moments. -Under Windows (not Cygwin), the scripts should have the extension .bat. +Below is a list of filenames of scripts and a description of when they are run. +A script is only run if it exists and if it is executable. + +Scripts are run synchronously; +this means that tinc will temporarily stop processing packets until the called script finishes executing. +This guarantees that scripts will execute in the exact same order as the events that trigger them. +If you need to run commands asynchronously, you have to ensure yourself that they are being run in the background. + +Under Windows (not Cygwin), the scripts must have the extension .bat. @table @file @cindex tinc-up @@ -1266,6 +1274,7 @@ If it is present it will be executed right after the tinc daemon has been started and has connected to the virtual network device. It should be used to set up the corresponding network interface, but can also be used to start other things. + Under Windows you can use the Network Connections control panel instead of creating this script. @cindex tinc-down -- 2.20.1