Make 'cmd-skip' warning message consistent for IPv4 and IPv6
This commit is contained in:
parent
8883641d97
commit
8dcea0d779
1 changed files with 3 additions and 2 deletions
|
@ -3341,7 +3341,7 @@ sub get_ipv4 {
|
||||||
} elsif ($p{'usev4'} eq 'cmdv4') {
|
} elsif ($p{'usev4'} eq 'cmdv4') {
|
||||||
## Obtain IPv4 address by executing the command in "cmdv4=<command>"
|
## Obtain IPv4 address by executing the command in "cmdv4=<command>"
|
||||||
warning("'--cmd-skip' ignored for '--usev4=$p{'usev4'}'")
|
warning("'--cmd-skip' ignored for '--usev4=$p{'usev4'}'")
|
||||||
if (opt('verbose') && $p{'cmd-skip'});
|
if opt('verbose') && defined($p{'cmd-skip'});
|
||||||
if ($arg) {
|
if ($arg) {
|
||||||
my $sys_cmd = quotemeta($arg);
|
my $sys_cmd = quotemeta($arg);
|
||||||
$reply = qx{$sys_cmd};
|
$reply = qx{$sys_cmd};
|
||||||
|
@ -3454,7 +3454,8 @@ sub get_ipv6 {
|
||||||
$ipv6 = get_ip_from_interface($arg, 6);
|
$ipv6 = get_ip_from_interface($arg, 6);
|
||||||
} elsif ($p{'usev6'} eq 'cmdv6' || $p{'usev6'} eq 'cmd') {
|
} elsif ($p{'usev6'} eq 'cmdv6' || $p{'usev6'} eq 'cmd') {
|
||||||
## Obtain IPv6 address by executing the command in "cmdv6=<command>"
|
## Obtain IPv6 address by executing the command in "cmdv6=<command>"
|
||||||
warning("'--cmd-skip' ignored") if opt('verbose') && $p{'cmd-skip'};
|
warning("'--cmd-skip' ignored for '--usev6=$p{'usev6'}'")
|
||||||
|
if opt('verbose') && defined($p{'cmd-skip'});
|
||||||
if ($arg) {
|
if ($arg) {
|
||||||
my $sys_cmd = quotemeta($arg);
|
my $sys_cmd = quotemeta($arg);
|
||||||
$reply = qx{$sys_cmd};
|
$reply = qx{$sys_cmd};
|
||||||
|
|
Loading…
Reference in a new issue