X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Ftincctl.c;h=c3fa2fa75a1ffeb3362f5c81c498c46ab21dd6ac;hb=06a4a8c153407b690a3ce3f0e7fdaa8568ccb1a3;hp=a986af7633e69d9e7cf28b3d6956e9841e1335bd;hpb=e11daa264615f6eb5782f1f349b23f47518577dd;p=tinc diff --git a/src/tincctl.c b/src/tincctl.c index a986af76..c3fa2fa7 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -1,6 +1,6 @@ /* tincctl.c -- Controlling a running tincd - Copyright (C) 2007-2013 Guus Sliepen + Copyright (C) 2007-2014 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -308,8 +308,7 @@ static FILE *ask_and_open(const char *filename, const char *what, const char *mo /* Check stdin and stdout */ if(ask && tty) { /* Ask for a file and/or directory name. */ - fprintf(stdout, "Please enter a file to save %s to [%s]: ", what, filename); - fflush(stdout); + fprintf(stderr, "Please enter a file to save %s to [%s]: ", what, filename); if(fgets(buf, sizeof buf, stdin) == NULL) { fprintf(stderr, "Error while reading stdin: %s\n", strerror(errno)); @@ -1292,6 +1291,7 @@ const var_t variables[] = { {"IffOneQueue", VAR_SERVER}, {"Interface", VAR_SERVER}, {"KeyExpire", VAR_SERVER}, + {"ListenAddress", VAR_SERVER | VAR_MULTIPLE}, {"LocalDiscovery", VAR_SERVER}, {"MACExpire", VAR_SERVER}, {"MaxConnectionBurst", VAR_SERVER}, @@ -1710,8 +1710,7 @@ static int cmd_init(int argc, char *argv[]) { } else if(argc < 2) { if(tty) { char buf[1024]; - fprintf(stdout, "Enter the Name you want your tinc node to have: "); - fflush(stdout); + fprintf(stderr, "Enter the Name you want your tinc node to have: "); if(!fgets(buf, sizeof buf, stdin)) { fprintf(stderr, "Error while reading stdin: %s\n", strerror(errno)); return 1; @@ -1777,7 +1776,7 @@ static int cmd_init(int argc, char *argv[]) { fprintf(stderr, "Could not create file %s: %s\n", filename, strerror(errno)); return 1; } - fprintf(f, "#!/bin/sh\n\necho 'Unconfigured tinc-up script, please edit!'\n\n#ifconfig $INTERFACE netmask \n"); + fprintf(f, "#!/bin/sh\n\necho 'Unconfigured tinc-up script, please edit '$0'!'\n\n#ifconfig $INTERFACE netmask \n"); fclose(f); } #endif