From: Ian Jackson Date: Tue, 20 Apr 2010 20:16:23 +0000 (+0100) Subject: allow hostname fqdn as non-option argument X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=inn-innduct.git;a=commitdiff_plain;h=681103a86d09ed69241a2e7e615149e2e1917ad5 allow hostname fqdn as non-option argument --- diff --git a/backends/innduct.c b/backends/innduct.c index 89e15b6..27fba90 100644 --- a/backends/innduct.c +++ b/backends/innduct.c @@ -2181,9 +2181,15 @@ int main(int argc, char **argv) { } if (!arg) badusage("need site name argument"); - if (*++argv) badusage("too many non-option arguments"); sitename= arg; + if ((arg= *++argv)) { + if (remote_host) badusage("must not specify -h and also host as argument"); + remote_host= arg; + } + + if (*++argv) badusage("too many non-option arguments"); + if (nocheck_thresh_pct < 0 || nocheck_thresh_pct > 100) badusage("nocheck threshold percentage must be between 0..100"); nocheck_thresh= nocheck_thresh_pct * 0.01;