summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 36e53c0)
raw | patch | inline | side by side (parent: 36e53c0)
author | Sebastian Harl <sh@tokkee.org> | |
Fri, 4 Apr 2008 20:05:48 +0000 (22:05 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Tue, 8 Apr 2008 07:56:05 +0000 (09:56 +0200) |
Either the output format of 'rrdtool dump' has changed or there was an
error in the regex used with sed in the first place. Anyway, in some cases
the 'if_octects' DS's did not get translated. 'rrdtool tune' should be
able to handle it correctly in any case.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
error in the regex used with sed in the first place. Anyway, in some cases
the 'if_octects' DS's did not get translated. 'rrdtool tune' should be
able to handle it correctly in any case.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
contrib/migrate-3-4.px | patch | blob | history |
diff --git a/contrib/migrate-3-4.px b/contrib/migrate-3-4.px
index 673929cc086faee9ca40db640a49ad0dfd33be03..bb5bc94c5ad685958d21d89c44ffb7c4ede10e80 100755 (executable)
--- a/contrib/migrate-3-4.px
+++ b/contrib/migrate-3-4.px
print "./rrd_filter.px -i '$InDir/$orig_filename' -m '${src_ds}:${dst_ds}' -o '$OutDir/$dest_filename'\n";
}
}
- elsif (exists ($TypeRename{$orig->{'type'}}))
+ else
+ {
+ print "cp '$InDir/$orig_filename' '$OutDir/$dest_filename'\n";
+ }
+
+ if (exists ($TypeRename{$orig->{'type'}}))
{
my $src_dses = $TypeRename{$orig->{'type'}}->{'from'};
my $dst_dses = $TypeRename{$orig->{'type'}}->{'to'};
- my @sed_prog = ();
+ print "rrdtool tune '$OutDir/$dest_filename'";
for (my $i = 0; $i < @$src_dses; $i++)
{
- push (@sed_prog, 's/^' . $src_dses->[$i] . '$/' . $dst_dses->[$i] . '/g;');
+ print " --data-source-rename "
+ . $src_dses->[$i] . ':' . $dst_dses->[$i];
}
-
- print "rrdtool dump '$InDir/$orig_filename' | sed -e '" . join (' ', @sed_prog) . "' | rrdtool restore - '$OutDir/$dest_filename'\n";
- }
- else
- {
- print "cp '$InDir/$orig_filename' '$OutDir/$dest_filename'\n";
+ print "\n";
}
}