1
0
Fork 0
mirror of https://gitlab.com/netravnen/NetworkLabNotes.git synced 2024-11-26 19:27:57 +00:00

Changed script to use put instead

This commit is contained in:
chhan11 2017-05-22 14:20:17 +02:00
parent 7a3ec62987
commit e87daeb572
2 changed files with 45 additions and 23 deletions

View file

@ -1,15 +1,26 @@
tclsh tclsh
puts [ open "flash:reset.tcl" w+ ] { puts [ open "flash:reset.tcl" w+ ] {
typeahead "\n"
copy running-config startup-config puts "Erasing Configuration"
typeahead "\n" typeahead "r"
erase startup-config
delete /force vlan.dat puts [ exec "write erase" ]
delete /force multiple-fs puts "Erasing VLAN Database"
ios_config "sdm prefer lanbase-routing" typeahead "r"
typeahead "\n"
puts "Reloading the switch in 1 minute, type reload cancel to halt" puts [ exec "del flash:vlan.dat" ]
typeahead "\n" puts "Copying Base Configuration To Startup"
reload in 1 RESET.TCL SCRIPT RUN typeahead "r"
puts [ ios_config "sdm prefer lanbase-routing" ]
puts "Changing prefered sdm to lanbase-routing"
typeahead "r"
puts [ exec "copy flash:base.cfg nvram:startup-config" ]
puts "Reloading the layer 2 switch"
typeahead "r"
puts [ exec "reload" ]
}
} }
tclquit tclquit

View file

@ -1,15 +1,26 @@
tclsh tclsh
puts [ open "flash:reset.tcl" w+ ] { puts [ open "flash:reset.tcl" w+ ] {
typeahead "\n"
copy running-config startup-config puts "Erasing Configuration"
typeahead "\n" typeahead "r"
erase startup-config
delete /force vlan.dat puts [ exec "write erase" ]
delete /force multiple-fs puts "Erasing VLAN Database"
ios_config "sdm prefer dual-ipv4-and-ipv6 routing" typeahead "r"
typeahead "\n"
puts "Reloading the switch in 1 minute, type reload cancel to halt" puts [ exec "delete flash:vlan.dat" ]
typeahead "\n" puts "Copying Base Configuration To Startup"
reload in 1 RESET.TCL SCRIPT RUN typeahead "r"
puts [ ios_config "sdm prefer dual-ipv4-and-ipv6 routing" ]
puts "Changing prefered sdm to dual-ipv4-and-ipv6 routing"
typeahead "r"
puts [ exec "copy flash:base.cfg nvram:startup-config" ]
puts "Reloading the layer 3 switch"
typeahead "r"
puts [ exec "reload" ]
}
} }
tclquit tclquit