summaryrefslogtreecommitdiffstats
path: root/procd.c
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-11-22 13:13:54 +0100
committerJohn Crispin <blogic@openwrt.org>2013-11-22 15:04:07 +0100
commitdc3988c38546c37a02030af8201048272caa7ded (patch)
tree359f49364a9ac5ca4f792076a1a6b91d4d786cd3 /procd.c
parent21d307367eb991f7494ce43087a5edb94288d08f (diff)
downloadunitd-dc3988c38546c37a02030af8201048272caa7ded.tar
unitd-dc3988c38546c37a02030af8201048272caa7ded.zip
cleanup debug level handover
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'procd.c')
-rw-r--r--procd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/procd.c b/procd.c
index 6fb0a72..ad80284 100644
--- a/procd.c
+++ b/procd.c
@@ -40,6 +40,12 @@ static int usage(const char *prog)
int main(int argc, char **argv)
{
int ch;
+ char *dbglvl = getenv("DBGLVL");
+
+ if (dbglvl) {
+ debug = atoi(dbglvl);
+ unsetenv("DBGLVL");
+ }
while ((ch = getopt(argc, argv, "d:s:h:")) != -1) {
switch (ch) {