wok-4.x diff perl-rrd-simple/stuff/usr/bin/rrd_addsource @ rev 6419

Up: lxpanel to 0.5.6. I committed out my patch since it doesn't patch now. I also took battary montor out so lxpanel will build. All other plugins are there.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Sep 26 17:02:23 2010 +0000 (2010-09-26)
parents 471df2a3ab20
children
line diff
     1.1 --- a/perl-rrd-simple/stuff/usr/bin/rrd_addsource	Fri Jun 26 17:57:24 2009 +0200
     1.2 +++ b/perl-rrd-simple/stuff/usr/bin/rrd_addsource	Sun Sep 26 17:02:23 2010 +0000
     1.3 @@ -5,16 +5,18 @@
     1.4  
     1.5  use RRD::Simple();
     1.6  
     1.7 -if (@ARGV != 2) {
     1.8 -   print "Usage: $0 rrdfile DSname\n";
     1.9 +if (@ARGV != 3) {
    1.10 +   print "Usage: $0 rrdfile DSname DStype \n";
    1.11 +   print "Example: $0 cpu.rrd nice COUNTER \n";
    1.12     exit;
    1.13  }
    1.14  
    1.15  my $file = $ARGV[0];
    1.16  my $dsname = $ARGV[1];
    1.17 +my $dstype = $ARGV[2];
    1.18  
    1.19  my $rrd = RRD::Simple->new();
    1.20  
    1.21 -print "Add $dsname into $file...";
    1.22 -$rrd->add_source($file, 'DS_name' => $dsname);
    1.23 +print "Add $dsname:$dstype into $file...";
    1.24 +$rrd->add_source($file, $dsname => $dstype);
    1.25  print " ok.\n";