Commit f6ab7761 authored by Dan Reading's avatar Dan Reading

extend to backup dell force10 switch

parent a7430d9d
......@@ -65,7 +65,7 @@ foreach my $switch (@ARGV) {
#
# Is it a Cisco or maybe an HP
my $type = getDeviceType($switch);
if ($type !~ /cisco/ && $type !~ /catalyst/ && $type !~ /hp/ ) {
if ($type !~ /cisco/ && $type !~ /catalyst/ && $type !~ /hp/ && $type !~ /force10/ ) {
die " *** $0:\n" .
" only Cisco and Procurves supported NOT (type $type)\n";
}
......@@ -79,6 +79,14 @@ foreach my $switch (@ARGV) {
system "scp $switch:/cfg/running-config $BACKUPDIR/$switch-$datestr\n"
and die "Unable to grab and save config for $switch\n"
}
if ($type =~ /force10/ ) {
system "ssh toor\@$switch write terminal \> $BACKUPDIR/$switch.in\n"
and die "Unable to grab and save config for $switch\n";
system "egrep -v \\#\\|Current $BACKUPDIR/$switch.in \> $BACKUPDIR/$switch-$datestr\n"
and die "Unable to strip first and last lines for $switch\n";
system "rm -f $BACKUPDIR/$switch.in\n"
and die "rm $BACKUPDIR/$switch.in failed\n"
}
}
exit 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment