|
@@ -160,6 +160,9 @@ if { $image != {} } {
|
|
|
error $result $errorInfo
|
|
|
}
|
|
|
|
|
|
+ # Log result in case this fails
|
|
|
+ action_syslog msg "Output of copy command: '$result'"
|
|
|
+
|
|
|
if { [catch {cli_exec $cli(fd) "config t"} result] } {
|
|
|
error $result $errorInfo
|
|
|
}
|
|
@@ -188,6 +191,15 @@ if { $image != {} } {
|
|
|
error $result $errorInfo
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if { [catch {cli_exec $cli(fd) "show boot | inc BOOT path-list"} result] } {
|
|
|
+ error $result $errorInfo
|
|
|
+ }
|
|
|
+
|
|
|
+ if { ! [regexp "$fstype$image" $result] } {
|
|
|
+ action_syslog msg "FAILED BOOT: Failed to set boot variable: '$result'"
|
|
|
+ exit 1
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if { $config != {} } {
|
|
@@ -253,7 +265,10 @@ if { $image != {} } {
|
|
|
error $result $errorInfo
|
|
|
}
|
|
|
|
|
|
- regexp {= ([A-Fa-f0-9]+)} $result -> md5
|
|
|
+ if { ! [regexp {= ([A-Fa-f0-9]+)} $result -> md5] } {
|
|
|
+ action_syslog msg "MD5 VALIDATION FAILED: '$result'"
|
|
|
+ exit 1
|
|
|
+ }
|
|
|
set verify_image [url_encode $image]
|
|
|
}
|
|
|
|