1.4.12 strip whitespace in template defs in sanoid.conf per #61

This commit is contained in:
jimsalterjrs 2017-07-12 16:25:34 -04:00
parent 7e22bff175
commit 243653fd9f
4 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,5 @@
1.4.12 Sanoid now strips trailing whitespace in template definitions in sanoid.conf, per Github #61
1.4.11 enhanced Syncoid to use zfs `guid` property rather than `creation` property to ensure snapshots on source
and target actually match. This immediately prevents conflicts due to timezone differences on source and target,
and also paves the way in the future for Syncoid to find matching snapshots even after `zfs rename` on source

View File

@ -1 +1 @@
1.4.11
1.4.12

5
sanoid
View File

@ -4,7 +4,7 @@
# from http://www.gnu.org/licenses/gpl-3.0.html on 2014-11-17. A copy should also be available in this
# project's Git repository at https://github.com/jimsalterjrs/sanoid/blob/master/LICENSE.
my $version = '1.4.11';
my $version = '1.4.12';
use strict;
use Config::IniFiles; # read samba-style conf file
@ -577,6 +577,9 @@ sub init {
if (defined $ini{$section}{'use_template'}) {
my @templates = split (' *, *',$ini{$section}{'use_template'});
foreach my $rawtemplate (@templates) {
# strip trailing whitespace
$rawtemplate =~ s/\s+$//g;
my $template = 'template_'.$rawtemplate;
foreach my $key (keys %{$ini{$template}}) {
if (! ($key =~ /template|recursive/)) {

View File

@ -4,7 +4,7 @@
# from http://www.gnu.org/licenses/gpl-3.0.html on 2014-11-17. A copy should also be available in this
# project's Git repository at https://github.com/jimsalterjrs/sanoid/blob/master/LICENSE.
my $version = '1.4.11';
my $version = '1.4.12';
use strict;
use warnings;