projects
/
dell-switch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d24046
)
don't save files without command (prompt only)
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 17 Sep 2015 17:41:53 +0000
(19:41 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 17 Sep 2015 17:41:53 +0000
(19:41 +0200)
dell-switch.pl
patch
|
blob
|
history
diff --git
a/dell-switch.pl
b/dell-switch.pl
index
5b9109c
..
a4fc2bb
100755
(executable)
--- a/
dell-switch.pl
+++ b/
dell-switch.pl
@@
-44,6
+44,8
@@
chdir 'log';
sub save_log {
my ($ip, $hostname, $command, $buff) = @_;
+
+ return unless $command;
my $file = "${ip}_${hostname}_${command}.log";
open my $log, '>', $file;