|
@@ -119,7 +119,7 @@ foreach line [split [::http::data $tok] "\n"] {
|
|
|
set sdm $res
|
|
|
}
|
|
|
if { [regexp {^PNP} $line] } {
|
|
|
- set pnp 1
|
|
|
+ set pnp 1
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -153,7 +153,7 @@ if { $image != {} } {
|
|
|
}
|
|
|
|
|
|
if { [catch {cli_exec $cli(fd) "end"} result] } {
|
|
|
- error $result $errorInfo
|
|
|
+ error $result $errorInfo
|
|
|
}
|
|
|
|
|
|
if { [catch {cli_exec $cli(fd) "copy $TFTP_URL/$image $fstype"} result] } {
|
|
@@ -178,7 +178,7 @@ if { $image != {} } {
|
|
|
}
|
|
|
|
|
|
if { [catch {cli_exec $cli(fd) "copy ${fstype}boot_hack.txt start"} result] } {
|
|
|
- error $result $errorInfo
|
|
|
+ error $result $errorInfo
|
|
|
}
|
|
|
|
|
|
if { [catch {cli_exec $cli(fd) "config t"} result] } {
|
|
@@ -204,9 +204,9 @@ if { $image != {} } {
|
|
|
file delete -force ${fstype}boot_hack.txt
|
|
|
|
|
|
if { [regexp {packages.conf} $imagepath] } {
|
|
|
- if { [catch {cli_exec $cli(fd) "del /force ${fstype}*.pkg"} result] } {
|
|
|
- error $result $errorInfo
|
|
|
- }
|
|
|
+ if { [catch {cli_exec $cli(fd) "del /force ${fstype}*.pkg"} result] } {
|
|
|
+ error $result $errorInfo
|
|
|
+ }
|
|
|
if { [catch {cli_exec $cli(fd) "del /force ${fstype}packages.conf"} result] } {
|
|
|
error $result $errorInfo
|
|
|
}
|
|
@@ -257,9 +257,9 @@ if { $config != {} } {
|
|
|
puts "WARNING: Failed to change license: '$result'"
|
|
|
}
|
|
|
if { [regexp {Invalid input} $result] } {
|
|
|
- if { [catch {cli_exec $cli(fd) "license right-to-use activate ipservices all acceptEULA"} result] } {
|
|
|
- puts "WARNING: Failed to change license: '$result'"
|
|
|
- }
|
|
|
+ if { [catch {cli_exec $cli(fd) "license right-to-use activate ipservices all acceptEULA"} result] } {
|
|
|
+ puts "WARNING: Failed to change license: '$result'"
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -282,7 +282,7 @@ set verify_image {}
|
|
|
|
|
|
if { $image != {} } {
|
|
|
if { [catch {cli_exec $cli(fd) "verify /md5 $fstype$image"} result] } {
|
|
|
- error $result $errorInfo
|
|
|
+ error $result $errorInfo
|
|
|
}
|
|
|
|
|
|
if { ! [regexp {= ([A-Fa-f0-9]+)} $result -> md5] } {
|
|
@@ -296,10 +296,10 @@ if { $config != {} || $image != {} } {
|
|
|
if { $config != {} } {
|
|
|
if { [catch {cli_exec $cli(fd) "copy start ${TFTP_URL}/device-tmp/$config"} result] } {
|
|
|
error $result $errorInfo
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
- # Wait a max of five seconds for the tftp daemon to flush its write buffer.
|
|
|
- after 5000
|
|
|
+ # Wait a max of five seconds for the tftp daemon to flush its write buffer.
|
|
|
+ after 5000
|
|
|
}
|
|
|
|
|
|
::http::config -useragent "tm_sw_autoconf.tcl/1.0"
|
|
@@ -317,19 +317,19 @@ if { $config != {} || $image != {} } {
|
|
|
}
|
|
|
|
|
|
if { $config != {} } {
|
|
|
- # XXX: This seems weird, but it's required to make sure the VLAN database
|
|
|
+ # XXX: This seems weird, but it's required to make sure the VLAN database
|
|
|
# is properly updated upon reboot. By loading the startup config into
|
|
|
# running before rebooting, this reliable ensures the VLAN database is
|
|
|
# consistent.
|
|
|
if { [catch {cli_exec $cli(fd) "config mem"} result] } {
|
|
|
error $result $errorInfo
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if { $pnp == 1 } {
|
|
|
if { [catch {cli_exec $cli(fd) "test pnpa discovery process"} result] } {
|
|
|
- error $result $errorInfo
|
|
|
+ error $result $errorInfo
|
|
|
}
|
|
|
|
|
|
# At this point, PnP takes over.
|