projects
/
dell-switch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1153cd
)
exit 0 if switch is not accessable
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 10 Dec 2015 13:28:39 +0000
(14:28 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 10 Dec 2015 13:28:39 +0000
(14:28 +0100)
dell-switch.pl
patch
|
blob
|
history
diff --git
a/dell-switch.pl
b/dell-switch.pl
index
158c8e4
..
9546561
100755
(executable)
--- a/
dell-switch.pl
+++ b/
dell-switch.pl
@@
-22,6
+22,10
@@
my @commands = @ARGV;
warn "## $ip\n";
my $ssh = Net::OpenSSH->new('auto@'.$ip);
my ($pty ,$pid) = $ssh->open2pty();
+if ( ! $pty ) {
+ warn "ERROR: can't connect to $ip, skipping";
+ exit 0;
+}
my $buff;