*-{up,down} env vars

Nicolás Reynolds fauno at kiwwwi.com.ar
Fri Dec 13 14:42:52 CET 2013


hi!  yesterday i was adding "hooks" to librevpn's tools[0] and while
debugging[1] why tinc would say the scripts exited with non zero status,
i noticed the PWD wasn't set to what i expected (PWD=/ instead of
PWD=/etc/tinc/$NETNAME).  the hooks/scripts dir is in scripts/ so
running scripts/$event-* would fail because it'd look for them in
/scripts/$event-*...

at first i guessed PWD is set to the HOME of the user tinc is running as
(since "nobody" has HOME=/) but while running a debug session as root i
noticed PWD=current/dir.

is this correct?  shouldn't tinc run scripts with a path relative to
its configuration? :)



[0]: https://github.com/fauno/librevpn/tree/develop
[1]: https://github.com/fauno/librevpn/blob/develop/lib/skel/scripts/debug
     more info on hooks:
      https://github.com/fauno/librevpn/blob/develop/doc/en/lvpn-install-script.markdown
-- 
:O
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20131213/6c8c8220/attachment.sig>


More information about the tinc mailing list