Hi all!
I'm programming a tunnelbroker with perl. We are already able to create tunnels by means of a telnet session using a telnet library of perl,
but, when I try to delete the tunnel (delete -r tunnel tb-008, for example) logouts the telnet session and the tunnel wasn't removed.
The following is my code:
$t->open('10.0.0.4'); $t->login('XXXXXX', 'XXXXXX');
$t->print('admin'); $t->waitfor('/Password/');
$t->print('XXXXXX');
$t->waitfor('/CONSULINTEL/'); $t->cmd('config');
$t->cmd('delete -r tunnel tb-004');
$t->waitfor('/Are you sure? (y/n):.*$/'); $t->print('y');
$t->waitfor('/CONSULINTEL/'); $t->cmd('save');
After the 'delete' command, the router asks about if you are sure, but I'm not able to answer this question. I try to waitfor the question and then $t->print('y'); but it doesn't work. Could anybody help me? I'm desperate.
It would be very hard to troubleshoot something like this remotely, for me at least. My two thoughts are that the waitfor() call has the wrong information, and thus isn't working out or you are forgetting to include line endings and the router isn't liking that. Remember that a telnet line ending is \015\012. That's about all I can think of, from the information provided. Sorry if that isn't much help.
James
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]