wok-next annotate ocsinventory-agent/stuff/ocsinventory-agent-1.1.2.1.u @ rev 12910
Up leocad (0.76.2)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue May 29 18:59:34 2012 +0200 (2012-05-29) |
parents | |
children |
rev | line source |
---|---|
erjo@8386 | 1 --- Ocsinventory-Agent-1.1.2.1-ori/MANIFEST |
erjo@8386 | 2 +++ Ocsinventory-Agent-1.1.2.1/MANIFEST |
erjo@8386 | 3 @@ -75,6 +75,7 @@ |
erjo@8386 | 4 lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/BSDpkg.pm |
erjo@8386 | 5 lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/ByHand.pm |
erjo@8386 | 6 lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/Deb.pm |
erjo@8386 | 7 +lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/Tazpkg.pm |
erjo@8386 | 8 lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/Gentoo.pm |
erjo@8386 | 9 lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/Pacman.pm |
erjo@8386 | 10 lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/RPM.pm |
erjo@8386 | 11 --- Ocsinventory-Agent-1.1.2.1-ori/lib/Ocsinventory/Agent/Backend/OS/Linux/Drives.pm |
erjo@8386 | 12 +++ Ocsinventory-Agent-1.1.2.1/lib/Ocsinventory/Agent/Backend/OS/Linux/Drives.pm |
erjo@8386 | 13 @@ -3,7 +3,7 @@ |
erjo@8386 | 14 use strict; |
erjo@8386 | 15 sub check { |
erjo@8386 | 16 return unless can_run ("df"); |
erjo@8386 | 17 - my $df = `df -TP`; |
erjo@8386 | 18 + my $df = `df -k`; |
erjo@8386 | 19 return 1 if $df =~ /\w+/; |
erjo@8386 | 20 0 |
erjo@8386 | 21 } |
erjo@8386 | 22 @@ -58,7 +58,7 @@ |
erjo@8386 | 23 } |
erjo@8386 | 24 } |
erjo@8386 | 25 |
erjo@8386 | 26 - foreach(`df -TP`) { # TODO retrive error |
erjo@8386 | 27 + foreach(`df -k`) { # TODO retrive error |
erjo@8386 | 28 my $createdate; |
erjo@8386 | 29 my $free; |
erjo@8386 | 30 my $filesystem; |
erjo@8386 | 31 @@ -68,12 +68,12 @@ |
erjo@8386 | 32 my $volumn; |
erjo@8386 | 33 my $serial; |
erjo@8386 | 34 |
erjo@8386 | 35 - if(/^(\S+)\s+(\S+)\s+(\S+)\s+(?:\S+)\s+(\S+)\s+(?:\S+)\s+(\S+)\n/){ |
erjo@8386 | 36 - $free = sprintf("%i",($4/1024)); |
erjo@8386 | 37 - $filesystem = $2; |
erjo@8386 | 38 - $total = sprintf("%i",($3/1024)); |
erjo@8386 | 39 - $type = $5; |
erjo@8386 | 40 - $volumn = $1; |
erjo@8386 | 41 + if(/^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\n/){ |
erjo@8386 | 42 + $free = sprintf("%i",($4/1024)); |
erjo@8386 | 43 + $filesystem = $1; |
erjo@8386 | 44 + $total = sprintf("%i",($2/1024)); |
erjo@8386 | 45 + $type = `grep ^$1 /etc/mtab | cut -d " " -f 3`;; |
erjo@8386 | 46 + $volumn = $6; |
erjo@8386 | 47 |
erjo@8386 | 48 # no virtual FS |
erjo@8386 | 49 next if ($filesystem =~ /^(tmpfs|usbfs|proc|devpts|devshm|udev)$/); |