New -list-web-services option
This will make it possible for the Debian package to fetch the list of supported built-in web-based IP discovery services and prompt the user to choose one upon installation.
This commit is contained in:
parent
791890741b
commit
dd10696156
1 changed files with 51 additions and 46 deletions
|
|
@ -816,6 +816,10 @@ my %opt = ();
|
|||
my $deprecated_handler = sub { warning("'-$_[0]' is deprecated and does nothing"); };
|
||||
$opt{'fw-banlocal'} = $deprecated_handler;
|
||||
$opt{'if-skip'} = $deprecated_handler;
|
||||
$opt{'list-web-services'} = sub {
|
||||
printf("%s %s\n", $_, $builtinweb{$_}{url}) for sort(keys(%builtinweb));
|
||||
exit(0);
|
||||
};
|
||||
|
||||
my @opt = (
|
||||
"usage: ${program} [options]",
|
||||
|
|
@ -839,8 +843,9 @@ my @opt = (
|
|||
["if", "=s", "-if <interface> : obtain IP address from <interface>"],
|
||||
"",
|
||||
" Options that apply to 'use=web':",
|
||||
["web", "=s", "-web <service>|<url> : obtain IP address from a web-based IP discovery service, either a known <service> or a custom <url>"],
|
||||
["web", "=s", "-web <service>|<url> : obtain IP address from a web-based IP discovery service, either a known <service> (see '-list-web-services') or a custom <url>"],
|
||||
["web-skip", "=s", "-web-skip <pattern> : skip any IP addresses before <pattern> in the text returned from the web-based IP discovery service"],
|
||||
["list-web-services", "", "-list-web-services : print a machine-readable list of web-based IP discovery services for use with 'web=<service>' and exit. Format: one service per line, each line has the form '<service> <url>'"],
|
||||
"",
|
||||
" Options that apply to 'use=fw' and 'use=<device>':",
|
||||
["fw", "=s", "-fw <address>|<url> : obtain IP address from device with IP address <address> or URL <url>"],
|
||||
|
|
|
|||
Loading…
Reference in a new issue