projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5cbef90
)
Add DEBUG environment variable for scripts.
author
Guus Sliepen
<guus@tinc-vpn.org>
Tue, 21 Mar 2017 20:25:27 +0000
(21:25 +0100)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Tue, 21 Mar 2017 20:25:27 +0000
(21:25 +0100)
This contains the current debug level used by tinc. Scripts can use it
to decide whether to log debugging information of their own.
Closes #138 on GitHub.
src/script.c
patch
|
blob
|
history
diff --git
a/src/script.c
b/src/script.c
index
ceb6a1b
..
1ce59ea
100644
(file)
--- a/
src/script.c
+++ b/
src/script.c
@@
-105,6
+105,8
@@
void environment_init(environment_t *env) {
environment_add(env, "DEVICE=%s", device);
if(iface)
environment_add(env, "INTERFACE=%s", iface);
+ if(debug_level >= 0)
+ environment_add(env, "DEBUG=%d", debug_level);
}
void environment_exit(environment_t *env) {