Let tincctl use the NETNAME environment variable if no -n option is given.
[tinc] / src / tincctl.c
index 4f06daa..d1df07b 100644 (file)
@@ -138,6 +138,12 @@ static bool parse_options(int argc, char **argv) {
                }
        }
 
+       if(!netname) {
+               netname = getenv("NETNAME");
+               if(netname)
+                       netname = xstrdup(netname);
+       }
+
        return true;
 }