diff --git a/ddclient.in b/ddclient.in index 61a7bcd..c63155b 100755 --- a/ddclient.in +++ b/ddclient.in @@ -1592,8 +1592,9 @@ sub _read_config { if ($mode & 077 && -o FD) { if (-f FD && (chmod 0600, $file)) { warning("file $file must be accessible only by its owner (fixed)."); + } else { + warning("file $file must be accessible only by its owner."); } - warning("file $file must be accessible only by its owner."); } elsif (! -o FD && -w FD) { warning("file $file should be owned only by ddclient or not be writable."); } @@ -3163,12 +3164,11 @@ sub get_ipv4 { } elsif ($usev4 eq 'ifv4') { ## Obtain IPv4 address from interface mamed in "ifv4=" - warning("'--if-skip' is deprecated and does nothing for IPv4") if (opt('verbose') && opt('if-skip', $h)); $ipv4 = get_ip_from_interface($arg,4); } elsif ($usev4 eq 'cmdv4') { ## Obtain IPv4 address by executing the command in "cmdv4=" - warning("'--cmd-skip' is deprecated and does nothing for IPv4") if (opt('verbose') && opt('cmd-skip', $h)); + warning("'--cmd-skip' ignored for '--usev4=$usev4'") if (opt('verbose') && opt('cmd-skip', $h)); if ($arg) { my $sys_cmd = quotemeta($arg); $reply = qx{$sys_cmd}; @@ -3198,9 +3198,12 @@ sub get_ipv4 { # Stuff added to support Cisco router ip http or ASA https daemon # User fw-login should only have level 1 access to prevent # password theft. This is pretty harmless. - warning("'--if' does nothing for IPv4. Use '--ifv4'") if (opt('if', $h)); - warning("'--fw' does nothing for IPv4. Use '--fwv4'") if (opt('fw', $h)); - warning("'--fw-skip' does nothing for IPv4. Use '--fwv4-skip'") if (opt('fw-skip', $h)); + warning("'--if' is deprecated for '--usev4=$usev4'; use '--ifv4' instead") + if (!defined(opt('ifv4', $h)) && defined(opt('if', $h))); + warning("'--fw' is deprecated for '--usev4=$usev4'; use '--fwv4' instead") + if (!defined(opt('fwv4', $h)) && defiend(opt('fw', $h))); + warning("'--fw-skip' is deprecated for '--usev4=$usev4'; use '--fwv4-skip' instead") + if (!defined(opt('fwv4-skip', $h)) && defined(opt('fw-skip', $h))); my $queryif = opt('ifv4', $h) // opt('if', $h); $skip = opt('fwv4-skip', $h) // opt('fw-skip', $h) // ''; # Convert slashes to protected value "\/" @@ -3227,8 +3230,10 @@ sub get_ipv4 { $reply = ''; } else { - warning("'--fw' does nothing for IPv4. Use '--fwv4'") if (opt('fw', $h)); - warning("'--fw-skip' does nothing for IPv4. Use '--fwv4-skip'") if (opt('fw-skip', $h)); + warning("'--fw' is deprecated for '--usev4=$usev4'; use '--fwv4' instead") + if (!defined(opt('fwv4', $h)) && defined(opt('fw', $h))); + warning("'--fw-skip' is deprecated for '--usev4=$usev4'; use '--fwv4-skip' instead") + if (!defined(opt('fwv4-skip', $h)) && defined(opt('fw-skip', $h))); $url = opt('fwv4', $h) // opt('fw', $h) // ''; $skip = opt('fwv4-skip', $h) // opt('fw-skip', $h) // ''; @@ -3296,7 +3301,6 @@ sub get_ipv6 { warning("'--usev6=if' is deprecated. Use '--usev6=ifv6'"); $arg = opt('ifv6', $h) // $arg; } - warning("'--if-skip' is deprecated and does nothing for IPv6") if (opt('verbose') && opt('if-skip', $h)); $ipv6 = get_ip_from_interface($arg,6); } elsif ($usev6 eq 'cmdv6' || $usev6 eq 'cmd') { @@ -3305,7 +3309,7 @@ sub get_ipv6 { warning("'--usev6=cmd' is deprecated. Use '--usev6=cmdv6'"); $arg = opt('cmdv6', $h) // $arg; } - warning("'--cmd-skip' is deprecated and does nothing for IPv6") if (opt('verbose') && opt('cmd-skip', $h)); + warning("'--cmd-skip' ignored for '--usev6=$usev6'") if (opt('verbose') && opt('cmd-skip', $h)); if ($arg) { my $sys_cmd = quotemeta($arg); $reply = qx{$sys_cmd}; @@ -3318,7 +3322,8 @@ sub get_ipv6 { warning("'--usev6=web' is deprecated. Use '--usev6=webv6'"); $arg = opt('webv6', $h) // $arg; } - warning("'--web-skip' does nothing for IPv6. Use '--webv6-skip'") if (opt('web-skip', $h)); + warning("'--web-skip' ignored for '--usev6=$usev6'; use '--webv6-skip' instead") + if (!defined(opt('webv6-skip', $h)) && defined(opt('web-skip', $h))); $url = $arg; $skip = opt('webv6-skip', $h) // ''; if (exists $builtinweb{$url}) { @@ -3337,13 +3342,7 @@ sub get_ipv6 { ) // ''; } - } elsif ($usev6 eq 'cisco' || $usev6 eq 'cisco-asa') { - warning("'--usev6=cisco' and '--usev6=cisco-asa' are not implemented and do nothing"); - $reply = ''; - } elsif ($usev6 eq 'disabled') { - ## This is a no-op... Do not get an IPv6 address for this host/service - warning("'--usev6=no' is deprecated. Use '--usev6=disabled'") if ($usev6 eq 'no'); $reply = ''; } else {