I'm new to the THWACK community and to scripting so my apologies if this seems elementary. We have a couple hundred 9300s we need to upgrade the IOS on across our state. I've run lab tests using Jobs as well as the Firmware Upgrade feature and I've scoured the THWACK community and tested some of the shared script files that are out here.
I'm trying to setup a script that will run the following commands in the following order. I have a script that will successfully upgrade the IOS with no issue, however when I try to include the command to clean the flash files it errors out. Either there are no files for it to clean and it tries to resolve the "y" when it's passed, or it passes the command then immediately follows it with the "y" and the errors out when it looks for the "y/n" response.
What I would like to do is issue the following commands in order without it breaking on the"y/n" part of the file cleanup. I greatly appreciate any help. Thank you in advance.
1) Our switches are a few years old and most (not all) still of old IOS files, would like to clean flash and free up space before the install.
- request platform software package clean switch all file flash: (outdated, I know
)
2) copy the new IOS image to flash
- If possible using "copy ftp:..... flash:" command
- If not, the TFTP copy used during the Firmware Upgrade feature works
3) change boot variable, once new IOS image has copied over
- conf t
- no boot system
- boot system switch all flash:packages.conf
- exit
- wr
4) reload
5) clean flash files
- request platform software package clean switch all file flash:
Is this possible?