diff --git a/ddclient.in b/ddclient.in index ef2ddb0..ef0c52d 100755 --- a/ddclient.in +++ b/ddclient.in @@ -370,12 +370,12 @@ sub ip_strategies_usage { my %ipv4_strategies = ( 'disabled' => ": do not obtain an IPv4 address for this host", - 'ipv4' => ": obtain IPv4 from -ipv4
", + 'ipv4' => ": obtain IPv4 from -ipv4=
", 'webv4' => ": obtain IPv4 from an IP discovery page on the web", - 'ifv4' => ": obtain IPv4 from the -ifv4 ", - 'cmdv4' => ": obtain IPv4 from the -cmdv4 ", - 'fwv4' => ": obtain IPv4 from the firewall specified by -fwv4 ", - map { $_ => sprintf ": obtain IPv4 from %s at the -fwv4
", $builtinfw{$_}->{'name'} } keys %builtinfw, + 'ifv4' => ": obtain IPv4 from the -ifv4=", + 'cmdv4' => ": obtain IPv4 from the -cmdv4=", + 'fwv4' => ": obtain IPv4 from the firewall specified by -fwv4=", + map { $_ => sprintf ": obtain IPv4 from %s at the -fwv4=
", $builtinfw{$_}->{'name'} } keys %builtinfw, ); sub ipv4_strategies_usage { return map { sprintf(" -usev4=%-22s %s.", $_, $ipv4_strategies{$_}) } sort keys %ipv4_strategies; @@ -385,14 +385,14 @@ my %ipv6_strategies = ( 'no' => ": deprecated, use 'disabled'", 'disabled' => ": do not obtain an IPv6 address for this host", 'ip' => ": deprecated, use 'ipv6'", - 'ipv6' => ": obtain IPv6 from -ipv6
", + 'ipv6' => ": obtain IPv6 from -ipv6=
", 'web' => ": deprecated, use 'webv6'", 'webv6' => ": obtain IPv6 from an IP discovery page on the web", 'if' => ": deprecated, use 'ifv6'", - 'ifv6' => ": obtain IPv6 from the -if ", + 'ifv6' => ": obtain IPv6 from the -if=", 'cmd' => ": deprecated, use 'cmdv6'", - 'cmdv6' => ": obtain IPv6 from the -cmdv6 ", - 'fwv6' => ": obtain IPv6 from the firewall specified by -fwv6 ", + 'cmdv6' => ": obtain IPv6 from the -cmdv6=", + 'fwv6' => ": obtain IPv6 from the firewall specified by -fwv6=", ); sub ipv6_strategies_usage { return map { sprintf(" -usev6=%-22s %s.", $_, $ipv6_strategies{$_}) } sort keys %ipv6_strategies; @@ -1009,79 +1009,79 @@ $opt{'list-web-services'} = sub { my @opt = ( "usage: ${program} [options]", "options are:", - ["daemon", "=s", "-daemon : run as a daemon, specify as an interval"], + ["daemon", "=s", "-daemon= : run as a daemon, specify as an interval"], ["foreground", "!", "-foreground : do not fork"], - ["proxy", "=s", "-proxy : use as the HTTP proxy"], - ["server", "=s", "-server : update DNS information on "], - ["protocol", "=s", "-protocol : update protocol used"], + ["proxy", "=s", "-proxy= : use as the HTTP proxy"], + ["server", "=s", "-server= : update DNS information on "], + ["protocol", "=s", "-protocol= : update protocol used"], ["list-protocols", "", "-list-protocols : print a machine-readable list of supported update protocols and exit. Format: one per line"], - ["file", "=s", "-file : load configuration information from "], - ["cache", "=s", "-cache : record address used in "], - ["pid", "=s", "-pid : record process id in if daemonized"], + ["file", "=s", "-file= : load configuration information from "], + ["cache", "=s", "-cache= : record address used in "], + ["pid", "=s", "-pid= : record process id in if daemonized"], "", - ["use", "=s", "-use : deprecated, see 'usev4' and 'usev6'"], + ["use", "=s", "-use= : deprecated, see 'usev4' and 'usev6'"], &ip_strategies_usage(), - ["usev4", "=s", "-usev4 : how the should IPv4 address be obtained."], + ["usev4", "=s", "-usev4= : how the should IPv4 address be obtained."], &ipv4_strategies_usage(), - ["usev6", "=s", "-usev6 : how the should IPv6 address be obtained."], + ["usev6", "=s", "-usev6= : how the should IPv6 address be obtained."], &ipv6_strategies_usage(), "", " Options that apply to 'use=ip':", - ["ip", "=s", "-ip
: deprecated, use 'ipv4' or 'ipv6'"], - ["ipv4", "=s", "-ipv4
: set the IPv4 address to
"], - ["ipv6", "=s", "-ipv6
: set the IPv6 address to
"], + ["ip", "=s", "-ip=
: deprecated, use 'ipv4' or 'ipv6'"], + ["ipv4", "=s", "-ipv4=
: set the IPv4 address to
"], + ["ipv6", "=s", "-ipv6=
: set the IPv6 address to
"], "", " Options that apply to 'use=if':", - ["if", "=s", "-if : deprecated, use 'ifv4' or 'ifv6'"], - ["ifv4", "=s", "-ifv4 : obtain IPv4 address from "], - ["ifv6", "=s", "-ifv6 : obtain IPv6 address from "], + ["if", "=s", "-if= : deprecated, use 'ifv4' or 'ifv6'"], + ["ifv4", "=s", "-ifv4= : obtain IPv4 address from "], + ["ifv6", "=s", "-ifv6= : obtain IPv6 address from "], "", " Options that apply to 'use=web':", - ["web", "=s", "-web : deprecated, use 'webv4' or 'webv6'"], - ["web-skip", "=s", "-web-skip : deprecated, use 'webv4-skip' or 'webv6-skip'"], - ["webv4", "=s", "-webv4 : obtain IPv4 address from a web-based IP discovery service, either a known or a custom "], - ["webv4-skip", "=s", "-webv4-skip : skip any IP addresses before in the output of 'ip address show dev ' (or 'ifconfig ')"], - ["webv6", "=s", "-webv6 : obtain IPv6 address from a web-based IP discovery service, either a known or a custom "], - ["webv6-skip", "=s", "-webv6-skip : skip any IP addresses before in the output of 'ip address show dev ' (or 'ifconfig ')"], + ["web", "=s", "-web= : deprecated, use 'webv4' or 'webv6'"], + ["web-skip", "=s", "-web-skip= : deprecated, use 'webv4-skip' or 'webv6-skip'"], + ["webv4", "=s", "-webv4= : obtain IPv4 address from a web-based IP discovery service, either a known or a custom "], + ["webv4-skip", "=s", "-webv4-skip= : skip any IP addresses before in the output of 'ip address show dev ' (or 'ifconfig ')"], + ["webv6", "=s", "-webv6= : obtain IPv6 address from a web-based IP discovery service, either a known or a custom "], + ["webv6-skip", "=s", "-webv6-skip= : skip any IP addresses before in the output of 'ip address show dev ' (or 'ifconfig ')"], ["list-web-services", "", "-list-web-services : print a machine-readable list of web-based IP discovery services for use with 'web=' and exit. Format: one service per line, each line has the form ' '"], "", " Options that apply to 'use=fw' and 'use=':", - ["fw", "=s", "-fw : deprecated, use 'fwv4' or 'fwv6'"], - ["fw-skip", "=s", "-fw-skip : deprecated, use 'fwv4-skip' or 'fwv6-skip'"], - ["fwv4", "=s", "-fwv4 : obtain IPv4 address from device with IP address
or URL "], - ["fwv4-skip", "=s", "-fwv4-skip : skip any IP addresses before in the text returned from the device"], - ["fwv6", "=s", "-fwv6 : obtain IPv6 address from device with IP address
or URL "], - ["fwv6-skip", "=s", "-fwv6-skip : skip any IP addresses before in the text returned from the device"], - ["fw-login", "=s", "-fw-login : use when getting the IP from the device"], - ["fw-password", "=s", "-fw-password : use password when getting the IP from the device"], + ["fw", "=s", "-fw= : deprecated, use 'fwv4' or 'fwv6'"], + ["fw-skip", "=s", "-fw-skip= : deprecated, use 'fwv4-skip' or 'fwv6-skip'"], + ["fwv4", "=s", "-fwv4= : obtain IPv4 address from device with IP address
or URL "], + ["fwv4-skip", "=s", "-fwv4-skip= : skip any IP addresses before in the text returned from the device"], + ["fwv6", "=s", "-fwv6= : obtain IPv6 address from device with IP address
or URL "], + ["fwv6-skip", "=s", "-fwv6-skip= : skip any IP addresses before in the text returned from the device"], + ["fw-login", "=s", "-fw-login= : use when getting the IP from the device"], + ["fw-password", "=s", "-fw-password= : use password when getting the IP from the device"], ["list-devices", "", "-list-devices : print a machine-readable list of supported firewall/router devices and exit. Format: one device per line, each line has the form ' '"], "", " Options that apply to 'use=cmd':", - ["cmd", "=s", "-cmd : deprecated, use 'cmdv4' or 'cmdv6'"], - ["cmd-skip", "=s", "-cmd-skip : deprecated, filter in program wrapper script"], - ["cmdv4", "=s", "-cmdv4 : obtain IPv4 address from the output of "], - ["cmdv6", "=s", "-cmdv6 : obtain IPv6 address from the output of "], + ["cmd", "=s", "-cmd= : deprecated, use 'cmdv4' or 'cmdv6'"], + ["cmd-skip", "=s", "-cmd-skip= : deprecated, filter in program wrapper script"], + ["cmdv4", "=s", "-cmdv4= : obtain IPv4 address from the output of "], + ["cmdv6", "=s", "-cmdv6= : obtain IPv6 address from the output of "], "", - ["login", "=s", "-login : log in to the dynamic DNS service as "], - ["password", "=s", "-password : log in to the dynamic DNS service with password "], - ["host", "=s", "-host : update DNS information for "], + ["login", "=s", "-login= : log in to the dynamic DNS service as "], + ["password", "=s", "-password= : log in to the dynamic DNS service with password "], + ["host", "=s", "-host= : update DNS information for "], "", - ["options", "=s", "-options =[,=,...]\n : optional per-service arguments (see below)"], + ["options", "=s", "-options==[,=,...]\n : optional per-service arguments (see below)"], "", ["ssl", "!", "-{no}ssl : do updates over encrypted SSL connection"], - ["ssl_ca_dir", "=s", "-ssl_ca_dir : look in for certificates of trusted certificate authorities (default: auto-detect)"], - ["ssl_ca_file", "=s", "-ssl_ca_file : look at for certificates of trusted certificate authorities (default: auto-detect)"], + ["ssl_ca_dir", "=s", "-ssl_ca_dir= : look in for certificates of trusted certificate authorities (default: auto-detect)"], + ["ssl_ca_file", "=s", "-ssl_ca_file= : look at for certificates of trusted certificate authorities (default: auto-detect)"], ["fw-ssl-validate", "!", "-{no}fw-ssl-validate : Validate SSL certificate when retrieving IP address from firewall"], ["web-ssl-validate", "!", "-{no}web-ssl-validate : Validate SSL certificate when retrieving IP address from web"], ["retry", "!", "-{no}retry : retry failed updates"], ["force", "!", "-{no}force : force an update even if the update may be unnecessary"], - ["timeout", "=i", "-timeout : when fetching a URL, wait at most seconds for a response"], + ["timeout", "=i", "-timeout= : when fetching a URL, wait at most seconds for a response"], ["syslog", "!", "-{no}syslog : log messages to syslog"], - ["facility", "=s", "-facility : log messages to syslog to facility "], - ["priority", "=s", "-priority : log messages to syslog with priority "], - ["max-warn", "=i", "-max-warn : log at most warning messages for undefined IP address"], - ["mail", "=s", "-mail
: e-mail messages to
"], - ["mail-failure", "=s", "-mail-failure : e-mail messages for failed updates to "], + ["facility", "=s", "-facility= : log messages to syslog to facility "], + ["priority", "=s", "-priority= : log messages to syslog with priority "], + ["max-warn", "=i", "-max-warn= : log at most warning messages for undefined IP address"], + ["mail", "=s", "-mail=
: e-mail messages to
"], + ["mail-failure", "=s", "-mail-failure= : e-mail messages for failed updates to "], ["exec", "!", "-{no}exec : do {not} execute; just show what would be done"], ["debug", "!", "-{no}debug : print {no} debugging information"], ["verbose", "!", "-{no}verbose : print {no} verbose information"], @@ -1094,7 +1094,7 @@ my @opt = ( ["if-skip", "=s", ""], ## deprecated ["test", "!", ""], ## hidden ["geturl", "=s", ""], ## hidden - ["redirect", "=i", "-redirect : enable and follow at most HTTP 30x redirections"], + ["redirect", "=i", "-redirect= : enable and follow at most HTTP 30x redirections"], "", nic_examples(), # Note: These lines are copied below to the -version argument implementation @@ -1170,10 +1170,10 @@ sub main { read_cache(opt('cache'), \%cache); print_info() if opt('debug') && opt('verbose'); - fatal("invalid argument '-use %s'; possible values are:\n%s", $opt{'use'}, join("\n", ip_strategies_usage())) + fatal("invalid argument '-use=%s'; possible values are:\n%s", $opt{'use'}, join("\n", ip_strategies_usage())) unless exists $ip_strategies{lc opt('use')}; if (defined($opt{'usev6'})) { - usage("invalid argument '-usev6 %s'; possible values are:\n%s", $opt{'usev6'}, join("\n",ipv6_strategies_usage())) + usage("invalid argument '-usev6=%s'; possible values are:\n%s", $opt{'usev6'}, join("\n",ipv6_strategies_usage())) unless exists $ipv6_strategies{lc opt('usev6')}; }