linux check in the function should all be && and expand the die message

This commit is contained in:
Zane C. B-H 2019-08-09 07:11:22 -05:00
parent a839fc6de2
commit c0370eee3f
1 changed files with 2 additions and 2 deletions

View File

@ -91,13 +91,13 @@ sub lsof_to_nc_objects{
my $output_raw=`lsof -i UDP -i TCP -n -l -P`;
if (
( $? ne 0 ) ||
( $? ne 0 ) &&
(
( $^O =~ /linux/ ) &&
( $? eq 256 )
)
){
die('"lsof -i UDP -i TCP -n -l -P" exited with a non-zero value');
die('"lsof -i UDP -i TCP -n -l -P" exited with a non-zero value or in the case of some linux distros a non-1 value');
}
my @output_lines=split(/\n/, $output_raw);