Ok, this is annoying.. my script works perfectly until the last line.. here are the last couple of lines:<br><br>Primary DNS Server: 192.168.124.221<br>Optional DNS Server: 192.168.134.29<br>Is the above information correct (Y/N)?Y<br>
You must reboot the sensor to take the setting effects<br>Do you want to reboot now(Y/N)?<br><br>An oc -d of the last three lines looks like this:<br><br>0000000 I s t h e a b o v e i n f<br>
0000020 o r m a t i o n c o r r e c t<br>0000040 ( Y / N ) ? Y \n Y o u m u s<br>0000060 t r e b o o t t h e s e n<br>
0000100 s o r t o t a k e t h e<br>0000120 s e t t i n g e f f e c t s \n<br>0000140 D o y o u w a n t t o r<br>
0000160 e b o o t n o w ( Y / N ) ? \n<br>0000200 \n<br>0000201<br><br><br>I have tried *EVERYTHING* to match that last line including:<br><br> # now it tells us we must reboot (which we just told it we wanted to do).. so send another Y<br>
my($which, $why, $match, $before, $after) = $ssh->expect(30,'-re','You.*');<br><br> # now it tells us we must reboot (which we just told it we wanted to do).. so send another Y<br> my($which, $why, $match, $before, $after) = $ssh->expect(30,'*');<br>
<br> # now it tells us we must reboot (which we just told it we wanted to do).. so send another Y<br> my($which, $why, $match, $before, $after) = $ssh->expect(30,'-re','You.*(Y/N)?');<br><br>
I've even tossed out the "You" and started with "Do"... and I've tried to take the "magic match any darn thing" too.<br><br>And a thousand other combinations and nothing works. Does anyone have any ideas? this is really giving me a headache.. The line above ends much the same, but not exactly, but I've matched that and using the line below and it works fine... ugh. Any ideas would be very welcomed at this point...<br>
<br># now it wants to know if you want to reboot (and we do)<br>my($which, $why, $match, $before, $after) = $ssh->expect(30,'-re','The.*(Y/N)?');<br><br>Greg<br><br><br><br><br>