Hello,
I don't think so, but since few days, we have some problems with some nortel switches (470 & 5530), they crash (no way to ping them, and unable to connect directly on them with the admin port). We have to reboot them (cut off power).
I don't think my part of script is dangerous, but I would like you check it, I am not an expert on Nortel switches..
sub Recup_nortel_BS5530 {
$prompt = qw(/\>/);
$t= new Net::Telnet (Timeout=>25,
Errmode=>'return',
prompt=>$prompt,
);
$t->open(@switch_details[1]) or die "=> Echec à l'ouverture de connexion \n=> ".$t->errmsg."";
sleep 2;
$ctrly=$t->put(chr(25)) or die "=> Echec de l'envoi de Ctrl+Y \n=> ".$t->errmsg."";
sleep 2;
$t->waitfor('/Password:.*/');
$password=$t->print("@switch_details[3]") or die "=> Echec à l'envoi du password\n=> ".$t->errmsg."";
sleep 2;
$majc=$t->print(chr(67)) or die "=> Echec de l'envoi de Maj+C \n=> ".$t->errmsg."";
sleep 2;
$t->cmd("enable") or die "=> Echec de l'envoi de enable \n=> ".$t->errmsg."";
sleep 2;
$t->cmd("copy running-config tftp address $serveur_tftp filename @switch_details[2]") or die "=> Echec de l'envoi de copy\n=> ".$t->errmsg."";
sleep 5;
$t->close;
&controle_cfg;
return 1;
}
As you can see, it's a simple perl script which connect by telnet on the 5530' and do a configuration backup.
Is there something wrong ? The backup is done correctly, no problem.. But maybe ? Don't know, it's why I ask you to check it, please.
Many thanks,
Regards,
Ju
ps : sorry for my poooor english ;p