cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
872
Views
0
Helpful
2
Replies

ASR1k or IOSXE ,want to run script to press Enter key for confirmation

on ASR1K (IOSXE). I want to run "hw-module slot 0 reload" via the script , but after apply the command , you need to enter or type "y" Enter to confirm the Change.

 

SW version: System image file is "bootflash:asr1000rpx86-universalk9.16.09.04.SPA.bin"

<hostname>#hw-module slot 0 reload
Proceed with reload of module? [confirm]y

 

"hw-module slot 0 reload;y\r" ==> this command is working OK, on Unix. but not on ASR1k, it didn't work. 

We suspected the \r is not "Enter" in Cisco. or it might apply "y\r" before waiting for [confirm], on my script cannot run expext on the script or don't have delay or sleep on cli.

 

Please advise,

 

Thanks,

 

 

 

2 Replies 2

balaji.bandi
Hall of Fame
Hall of Fame

what script you using can you show the bit of script.

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

I used Virtual Operation (VO) liked a GUI mode based on NodeRed (Javascript) in the backgroup. I think it built by my company, not commercial one.

eg:

I just set

ne = "<device_name>

cmd = "<d>;</d>hw-module slot 0 reload;y\r" 

<d>;</d>  is to set ";" as delimitor between two cmd.

I did try. 

cmd = "<d>;</d>show clock; show version"  , it was working OK, but  for cmd = "<d>;</d>hw-module slot 0 reload;y\r" , it showed error msg as time out as no confirmation or Enter key.

So I suspected my script sending y\r before the router asking for confirmation or \r not equal Enter key.

I did try to  cmd = "<d>;</d>hw-module slot 0 reload;y\r\n" , doesn't work. but using autoexpect in unix, it accept "y\r" and testing VO for unix bash script working fine., but not working for ASR1K.