wok-6.x rev 8386
ocsinventory-agent: add patch for MANIFEST and Drives.pm
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Fri Feb 04 17:08:27 2011 +0100 (2011-02-04) |
parents | 45884a696424 |
children | f2d5f13a8935 |
files | ocsinventory-agent/stuff/ocsinventory-agent-1.1.2.1.u |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ocsinventory-agent/stuff/ocsinventory-agent-1.1.2.1.u Fri Feb 04 17:08:27 2011 +0100 1.3 @@ -0,0 +1,49 @@ 1.4 +--- Ocsinventory-Agent-1.1.2.1-ori/MANIFEST 1.5 ++++ Ocsinventory-Agent-1.1.2.1/MANIFEST 1.6 +@@ -75,6 +75,7 @@ 1.7 + lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/BSDpkg.pm 1.8 + lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/ByHand.pm 1.9 + lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/Deb.pm 1.10 ++lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/Tazpkg.pm 1.11 + lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/Gentoo.pm 1.12 + lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/Pacman.pm 1.13 + lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/RPM.pm 1.14 +--- Ocsinventory-Agent-1.1.2.1-ori/lib/Ocsinventory/Agent/Backend/OS/Linux/Drives.pm 1.15 ++++ Ocsinventory-Agent-1.1.2.1/lib/Ocsinventory/Agent/Backend/OS/Linux/Drives.pm 1.16 +@@ -3,7 +3,7 @@ 1.17 + use strict; 1.18 + sub check { 1.19 + return unless can_run ("df"); 1.20 +- my $df = `df -TP`; 1.21 ++ my $df = `df -k`; 1.22 + return 1 if $df =~ /\w+/; 1.23 + 0 1.24 + } 1.25 +@@ -58,7 +58,7 @@ 1.26 + } 1.27 + } 1.28 + 1.29 +- foreach(`df -TP`) { # TODO retrive error 1.30 ++ foreach(`df -k`) { # TODO retrive error 1.31 + my $createdate; 1.32 + my $free; 1.33 + my $filesystem; 1.34 +@@ -68,12 +68,12 @@ 1.35 + my $volumn; 1.36 + my $serial; 1.37 + 1.38 +- if(/^(\S+)\s+(\S+)\s+(\S+)\s+(?:\S+)\s+(\S+)\s+(?:\S+)\s+(\S+)\n/){ 1.39 +- $free = sprintf("%i",($4/1024)); 1.40 +- $filesystem = $2; 1.41 +- $total = sprintf("%i",($3/1024)); 1.42 +- $type = $5; 1.43 +- $volumn = $1; 1.44 ++ if(/^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\n/){ 1.45 ++ $free = sprintf("%i",($4/1024)); 1.46 ++ $filesystem = $1; 1.47 ++ $total = sprintf("%i",($2/1024)); 1.48 ++ $type = `grep ^$1 /etc/mtab | cut -d " " -f 3`;; 1.49 ++ $volumn = $6; 1.50 + 1.51 + # no virtual FS 1.52 + next if ($filesystem =~ /^(tmpfs|usbfs|proc|devpts|devshm|udev)$/);