--- archive/sysstats/getdata	2003/01/31 09:06:10	9
+++ archive/sysstats/getdata	2003/02/13 11:48:06	20
@@ -1,5 +1,5 @@
-#!/usr/bin/perl
- 
+#!/usr/bin/perl -W
+
 $datetime = `date -u '+%Y%m%d.%H:%M:%S'`;
 chomp $datetime;
 
@@ -10,12 +10,10 @@
 $cpu = $1;
 
 $df = `df -k`;
-$df =~ m|/dev/hda1\s+[0-9]+\s+([0-9]+)\s+([0-9]+)|;
-$hda1u = $1; $hda1f = $2;
-$df =~ m|/dev/hda3\s+[0-9]+\s+([0-9]+)\s+([0-9]+)|;
-$hda3u = $1; $hda3f = $2;
-$df =~ m|/dev/hdc1\s+[0-9]+\s+([0-9]+)\s+([0-9]+)|;
-$hdc1u = $1; $hdc1f = $2;
+$hda1u = $hda1f = $hda3u = $hda3f = $hdc1u = $hdc1f = '-';
+($hda1u, $hda1f) = ($1, $2) if $df =~ m|/dev/hda1\s+[0-9]+\s+([0-9]+)\s+([0-9]+)|;
+($hda3u, $hda3f) = ($1, $2) if $df =~ m|/dev/hda3\s+[0-9]+\s+([0-9]+)\s+([0-9]+)|;
+($hdc1u, $hdc1f) = ($1, $2) if $df =~ m|/dev/hdc1\s+[0-9]+\s+([0-9]+)\s+([0-9]+)|;
 
 $ip = `ip -s -o link show eth0`;
 $ip =~ /RX:.*?([0-9]+)/;