Persistent tun/tap
Guus Sliepen
guus at tinc-vpn.org
Tue Jan 26 10:13:15 CET 2016
On Tue, Jan 26, 2016 at 07:25:55AM +0000, mlist wrote:
> It would be nice if in a next tinc release you'll add some service variables tinc propagates to its scripts.
> So for example you can define in tinc.conf env variables like:
>
> SERVICE1=
> ...
> SERVICEn=
>
> and tinc will propagates all SERVICEx Variables found in tinc.conf to all scripts it calls. One can use theoretically infinite Env Var for custom behavior (like custom debug messages, conditional iptables rules load or something else), without lot of coding for you.
>
> Using a multi separated scripts called on state change, as you choice, is right, but make difficult to set common env var if you don't make a tinc inside mechanism like that.
I will not add this feature to tinc. You can easily do this yourself by
adding these environment variables to a separate file, and sourcing it
in the scripts that tinc calls. For example:
/etc/tinc/netname/variables:
SERVICE1=foo
/etc/tinc/netname/tinc-up:
#!/bin/sh
. /etc/tinc/netname/variables
echo SERVICE1=$SERVICE1
--
Met vriendelijke groet / with kind regards,
Guus Sliepen <guus at tinc-vpn.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20160126/6a1114a5/attachment.sig>
More information about the tinc
mailing list