"redirect-gateway" and other tricks in scripts
Julian Bäume
julian at svg4all.de
Thu Nov 11 17:38:12 CET 2010
Am Donnerstag, 11. November 2010, 13:24:42 schrieb Guus Sliepen:
> On Thu, Nov 11, 2010 at 08:57:58AM +0100, albi wrote:
> > > I don't want
> > > to put options in tincd that could easily be done by external tools or
> > > scripts.
> >
> > Thas fine, but it would be nice to have example scripts included in tinc.
> > For some people are "easy other tools" not so easy.
>
> Well, that is a good idea. Perhaps some default scripts that do nothing by
> default, but that read options from tinc.conf (remember, tincd ignores
> options it doesn't know about itself) to enable certain things.
Does this mean "exposing some variables from config-file into the scripts"?
Sounds helpful to me but I’m not sure, I’d use it. May be, tinc could ship
some scripts, that can be "source"-ed in the different scripts to provide
functions that do certain things. So one can do something like:
--- snip ---
[...]
source $TINC_HELPERS/redirect-gateway
[...]
redirect-gateway 10.23.42.1
[...]
--- snap ---
Or may be even just source a helper file with some standard functions by
default, so one doesn’t need to include it.
I‘m not sure, how this can/will work on windows, but may be something similar
is possible, too.
> Also, it would be nice to hear what kinds of things people do with scripts
> in tinc, maybe certain tricks could be put in these default scripts as
> well, or be put on the wiki.
>
> I can also add a section to the manual with helpful examples.
I’d prefer shipping example scripts as part of the documentation. So there
would be a sub-dir in the documentation directory, containing example files.
As a maintainer of the packages for openSUSE, I’d just install them into
/usr/share/doc/tinc/examples/. Many other programs do that, too. It would be
nice to have "make install" put the scripts, that are specific to the current
platform into the documentation directory. But this could also be done in the
package script, so shipping them only in the src tar.gz would be fine, too.
Since the documentation part will get somewhat large then, I’d ship it as
tinc-documentation package, but that’s a detail.
Anyway, a start would just be shipping some example scripts, that users can
copy and paste from. Just to provide some convenience for users that don’t
like wikis ;) These can be extended over time to have some kind of framework
of functions that can be used in the startup scripts.
Just my random thoughts on this topic ;)
bye then
julian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20101111/e1041063/attachment.pgp>
More information about the tinc
mailing list