Skip to content

Commit a75ca19

Browse files
committed
support prompt for copy running-config startup-config
1 parent 9f6fa30 commit a75ca19

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dell-switch.pl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ sub save_log {
130130
$buff = '';
131131
}
132132

133-
warn "# commands_while = ",dump( \@commands_while );
133+
#warn "# commands_while = ",dump( \@commands_while );
134134

135135
} elsif ( $buff =~ s{More: <space>, Quit: q.*One line: <return>\s*}{} ) {
136136
send_pty " ";
@@ -151,6 +151,10 @@ sub save_log {
151151
warn "\nRELOAD detected\n";
152152
sleep 0.5;
153153
send_pty 'y';
154+
} elsif ( $buff =~ s{\QAre you sure you want to save? (y/n)\E}{}s ) { # copy running-config startup-config
155+
warn "\nCOPY detected\n";
156+
sleep 0.5;
157+
send_pty 'y';
154158
} elsif ( $buff =~ m{MikroTik RouterOS} ) {
155159
warn "\nERROR: don't know how to talk to MicroTik - ABORTING";
156160
exit 0;

0 commit comments

Comments
 (0)