#431 sshcollector calls die() even if all the work is not done - stromsoe
This commit is contained in:
		| @@ -47,7 +47,11 @@ sub arpnip{ | ||||
|  | ||||
|     debug "$hostlabel $$ arpnip()"; | ||||
|  | ||||
|     my ($pty, $pid) = $ssh->open2pty or die "unable to run remote command"; | ||||
|     my ($pty, $pid) = $ssh->open2pty; | ||||
|     unless ($pty) { | ||||
|         debug "unable to run remote command [$hostlabel] " . $ssh->error; | ||||
|         return (); | ||||
|     } | ||||
|     my $expect = Expect->init($pty); | ||||
|  | ||||
|     my ($pos, $error, $match, $before, $after); | ||||
|   | ||||
| @@ -53,7 +53,11 @@ sub arpnip { | ||||
|  | ||||
|     debug "$hostlabel $$ arpnip()"; | ||||
|  | ||||
|     my ($pty, $pid) = $ssh->open2pty or die "unable to run remote command"; | ||||
|     my ($pty, $pid) = $ssh->open2pty; | ||||
|     unless ($pty) { | ||||
|         debug "unable to run remote command [$hostlabel] " . $ssh->error; | ||||
|         return (); | ||||
|     } | ||||
|     my $expect = Expect->init($pty); | ||||
|  | ||||
|     my ($pos, $error, $match, $before, $after); | ||||
|   | ||||
| @@ -50,7 +50,11 @@ sub arpnip { | ||||
|  | ||||
|     debug "$hostlabel $$ arpnip()"; | ||||
|  | ||||
|     my ($pty, $pid) = $ssh->open2pty or die "unable to run remote command"; | ||||
|     my ($pty, $pid) = $ssh->open2pty; | ||||
|     unless ($pty) { | ||||
|         debug "unable to run remote command [$hostlabel] " . $ssh->error; | ||||
|         return (); | ||||
|     } | ||||
|     my $expect = Expect->init($pty); | ||||
|  | ||||
|     my ($pos, $error, $match, $before, $after); | ||||
|   | ||||
| @@ -48,7 +48,11 @@ sub arpnip { | ||||
|  | ||||
|     debug "$hostlabel $$ arpnip()"; | ||||
|  | ||||
|     my ($pty, $pid) = $ssh->open2pty or die "unable to run remote command"; | ||||
|     my ($pty, $pid) = $ssh->open2pty; | ||||
|     unless ($pty) { | ||||
|         debug "unable to run remote command [$hostlabel] " . $ssh->error; | ||||
|         return (); | ||||
|     } | ||||
|     my $expect = Expect->init($pty); | ||||
|  | ||||
|     my ($pos, $error, $match, $before, $after); | ||||
|   | ||||
| @@ -50,7 +50,11 @@ sub arpnip { | ||||
|  | ||||
|     debug "$hostlabel $$ arpnip()"; | ||||
|  | ||||
|     my ($pty, $pid) = $ssh->open2pty or die "unable to run remote command"; | ||||
|     my ($pty, $pid) = $ssh->open2pty; | ||||
|     unless ($pty) { | ||||
|         debug "unable to run remote command [$hostlabel] " . $ssh->error; | ||||
|         return (); | ||||
|     } | ||||
|     my $expect = Expect->init($pty); | ||||
|  | ||||
|     my ($pos, $error, $match, $before, $after); | ||||
|   | ||||
| @@ -48,7 +48,11 @@ sub arpnip { | ||||
|  | ||||
|     debug "$hostlabel $$ arpnip()"; | ||||
|  | ||||
|     my ($pty, $pid) = $ssh->open2pty or die "unable to run remote command"; | ||||
|     my ($pty, $pid) = $ssh->open2pty; | ||||
|     unless ($pty) { | ||||
|         debug "unable to run remote command [$hostlabel] " . $ssh->error; | ||||
|         return (); | ||||
|     } | ||||
|     my $expect = Expect->init($pty); | ||||
|  | ||||
|     my ($pos, $error, $match, $before, $after); | ||||
|   | ||||
| @@ -39,7 +39,11 @@ sub arpnip{ | ||||
|  | ||||
|     debug "$hostlabel $$ arpnip()"; | ||||
|  | ||||
|     my ($pty, $pid) = $ssh->open2pty or die "unable to run remote command"; | ||||
|     my ($pty, $pid) = $ssh->open2pty; | ||||
|     unless ($pty) { | ||||
|         debug "unable to run remote command [$hostlabel] " . $ssh->error; | ||||
|         return (); | ||||
|     } | ||||
|     my $expect = Expect->init($pty); | ||||
|     my ($pos, $error, $match, $before, $after); | ||||
|     my $prompt = qr/> \r?$/; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user