Fixed Fedora specfile for Fedora 7 and collectd 4.0.5
[collectd.git] / contrib / extractDS.px
index f5370e6..bdc4b3d 100755 (executable)
@@ -19,7 +19,6 @@ the L<XML::Simple> module.
 =cut
 
 use Getopt::Long ('GetOptions');
-use XML::Simple (qw(xml_in xml_out));
 use Data::Dumper ();
 
 our $InFile;
@@ -236,8 +235,7 @@ sub extract_ds
        my $out_fh;
 
        open ($in_fh,  '-|', 'rrdtool', 'dump', $in_file) or die ("open (rrdtool): $!");
-#      open ($out_fh, '|-', 'rrdtool', 'restore', '-', $out_file) or die ("open (rrdtool): $!");
-       $out_fh = \*STDOUT;
+       open ($out_fh, '|-', 'rrdtool', 'restore', '-', $out_file) or die ("open (rrdtool): $!");
 
        while (my $line = <$in_fh>)
        {