diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-12-12 07:50:04 -0800 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-12-12 07:50:04 -0800 |
commit | f8be0d296136f0ca9af6d198f25a9ae162e3a21d (patch) | |
tree | 048a067179fa9ec050418f4ed9bcfbb853f9fef4 | |
parent | 8c58635ea7b3c129e3454775df08608903878cd6 (diff) | |
download | infinitytier-f8be0d296136f0ca9af6d198f25a9ae162e3a21d.tar.gz infinitytier-f8be0d296136f0ca9af6d198f25a9ae162e3a21d.zip |
Tell us something about auto-updates when command line help is displayed.
-rw-r--r-- | main.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -66,6 +66,24 @@ static void printHelp(const char *cn,FILE *out) { fprintf(out,"ZeroTier One version %d.%d.%d"ZT_EOL_S"(c)2012-2013 ZeroTier Networks LLC"ZT_EOL_S,Node::versionMajor(),Node::versionMinor(),Node::versionRevision()); fprintf(out,"Licensed under the GNU General Public License v3"ZT_EOL_S""ZT_EOL_S); +#ifdef ZT_AUTO_UPDATE + fprintf(out,"Auto-update enabled build, will update from URL:"ZT_EOL_S); + fprintf(out," %s"ZT_EOL_S,ZT_DEFAULTS.updateLatestNfoURL.c_str()); + fprintf(out,"Update authentication signing authorities: "ZT_EOL_S); + int no = 0; + for(std::map< Address,Identity >::const_iterator sa(ZT_DEFAULTS.updateAuthorities.begin());sa!=ZT_DEFAULTS.updateAuthorities.end();++sa) { + if (no == 0) + fprintf(out," %s",sa->first.toString().c_str()); + else fprintf(out,", %s",sa->first.toString().c_str()); + if (++no == 6) { + fprintf(out,ZT_EOL_S); + no = 0; + } + } + fprintf(out,ZT_EOL_S""ZT_EOL_S); +#else + fprintf(out,"Auto-updates not enabled on this build. You must update manually."ZT_EOL_S""ZT_EOL_S); +#endif fprintf(out,"Usage: %s [-switches] [home directory]"ZT_EOL_S""ZT_EOL_S,cn); fprintf(out,"Available switches:"ZT_EOL_S); fprintf(out," -h - Display this help"ZT_EOL_S); |