Sorry I have not done any runscript programming before, but reading this:<div><br></div><div><br></div><div><a href="http://lists.alioth.debian.org/pipermail/minicom-devel/2008/000904.html">http://lists.alioth.debian.org/pipermail/minicom-devel/2008/000904.html</a></div>
<div><br></div><div>(search for the "^C")</div><div><br></div><div>and referring to the documentation:</div><div><br></div><div><a href="http://linux.die.net/man/1/runscript">http://linux.die.net/man/1/runscript</a></div>
<div><br></div><div>and assuming the above example script runs well, it seemed that the difference now is that your script has a backslash before the control character?</div><div><br></div><div>Just my guess????</div><div>
<br><br><div class="gmail_quote">On Sat, Jan 12, 2013 at 8:04 PM, laliteshwar yadav <span dir="ltr"><<a href="mailto:lalit4294@gmail.com" target="_blank">lalit4294@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div>Hi Tushar,<br></div>I am facing a problem with the above implementation.<br><br></div>When target is powered on, logs coming started on minicom.<br></div>
After 1 second the message is coming as "<font>Executing boot script in 3.000 seconds - enter ^C to abort</font>".<br><br></div>Here, we need to give cntl+c command to stop the target from auto-boot. We want to flash new image into it.<br>
</div><div><br></div>Our task is to automate the process.<br><br></div>I tried with the following code to run through runscript.<br><br>set search_string="Executing boot script in 3.000 seconds"<br><br>timeout 50<br>
verbose on<br><br>send "\n\r\n\r"<br>
expect {<br> "$search_string" break<br> timeout 2 goto abort<br> }<br><br>abort:<br> print \nGiving cntl+c command on minicom<br> send "\^C\r"<br> send "\^C"<br>
send \^C\r<br> send ^C\r<br> expect {<br> "RedBoot>" break<br> timeout 3 goto panic<br> }<br> print \n!!!!!!Bye Bye runscript!!!!!!!<br>
sleep 2<br><br>panic:<br> print \n!!!!!!Bye Bye Minicom!!!!!!!\n<br> ! killall -2 minicom<br><br><br></div>What i am observing is , first this script is running then minicom logs start comming. Actually it should be as first some logs should come till the search string. Then our command cntl+c should run.<br>
<br>
</div>please help me..<br><br></div>Thank you in advance..<br><br><br></div>Regards,<br></div>lalit<br></div>
<br>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards,<br>Peter Teoh
</div>