tabernarious / f5-automated-backup-iapp

F5 iApp for automated backups to the local device and to network locations.
35 stars 26 forks source link

can't read "::destination_parameters__pruning_mode" #14

Closed tabernarious closed 6 years ago

tabernarious commented 6 years ago

Need to fix error: can't read "::destination_parameters__pruning_mode"

Here is the original post by keithhubb:


I'm using v3.1.3, and getting this message:

script did not successfully complete: (can't read "::destination_parameterspruning_mode": no such variable while executing "if { $::destination_parameterspruning_mode eq "Only Prune iApp-Generated Archives" } { set pruning_suffix $::destination_par..." invoked from within "if { $freq != "Disable" } { Ensure a default $filename_format is set if { $::destination_parameters__filenam..." line:44)

I Fixed it by changing line 54 from this:

if { $::destination_parameters__pruning_mode eq "Only Prune iApp-Generated Archives" } {

To this:

if { [info exists ::destination_parameterspruning_mode] && ($::destination_parameterspruning_mode eq "Only Prune iApp-Generated Archives") } {

Basically validating the variable exists as a condition to the 'if' statement.

tabernarious commented 6 years ago

I have verified and tested the suggested fix which will be included in v3.1.4