Hi,
I have a application where my script needs to do the following:
1)Telnet to a system, say A.
2)Do a bunch of tasks.
3)Reboot the system, A.
4)Again telnet to the system, A to check if it is on.
I have working code for 1, 2 and 4 parts. But I got some questions relating to 3)
I can use
#The enxt two lines are only for reference
#$t = new Net::Telnet (Timeout => 1000);
#$t->open("10.10.4.11");
$t->cmd(reboot);
but generally the target system, A hangs at the time (normally if you were working on A's console then you do a enter or something and we will get the command prompt).
1)How can I get the command prompt back and control back to the perl script?
Any thoughts?
Thanks,
R
2)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.