diff options
Diffstat (limited to 'draksnapshot-config')
-rwxr-xr-x | draksnapshot-config | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/draksnapshot-config b/draksnapshot-config index 6faf99a..00da4c2 100755 --- a/draksnapshot-config +++ b/draksnapshot-config @@ -63,17 +63,23 @@ my ($backup_list, $exclude_list) = map { } qw(backup exclude); +my $interval_exists; my %default_intervals = ( map { if (my ($type, $interval) = /^interval\s*(\S*)\s*(\S*)/) { + $interval_exists = 1; $type => $interval; } } grep { /^interval\s/ } cat_($config_file) ); -# initialize commented out fields: -$default_intervals{$_} ||= $default_values{$_} foreach @ordered_intervals; - +if ($interval_exists) { + # If there is some interval in the config file, keep them as is + $default_intervals{$_} ||= 0 foreach @ordered_intervals; +} else { + # Else we had broken it (#58534) so restore defaults + $default_intervals{$_} ||= $default_values{$_} foreach @ordered_intervals; +} ######### GUI |