| Summary: | Sysinfo HDD display error with large device | ||
|---|---|---|---|
| Product: | [Applications] konversation | Reporter: | Yann Verry <yanntech> |
| Component: | general | Assignee: | Konversation Bugs <konversation-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 1.0.1 | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
SVN commit 684946 by psn:
Add -P to the df options to handle long device names better as suggested by Yann Verry.
BUG:147274
M +1 -1 sysinfo
--- branches/extragear/kde3/network/konversation/scripts/sysinfo #684945:684946
@@ -32,7 +32,7 @@
}
' /proc/cpuinfo )
-HDD=$(df -l| awk '($1~/\/dev/){
+HDD=$(df -lP| awk '($1~/\/dev/){
use+=$3/1024^2;
tot+=$2/1024^2;
}
|
Version: 1.0.1 (using KDE KDE 3.5.7) Installed from: Ubuntu Packages OS: Linux in sysinfo script when you have a long device on your hdd, the df -l display on two line not one. Example : Sys. de fich. 1K-blocs Occupé Disponible Capacité Monté sur /dev/mapper/nvidia_ccchegbfp1 59515524 8800100 47643396 16% / /dev/mapper/nvidia_ccchegbfp3 31738420 16652176 13448016 56% /var /dev/mapper/nvidia_ccchegbfp2 138865648 74942200 56755648 57% /home tmpfs 2029292 0 2029292 0% /dev/shm I propose to add one option of 'df' command : -P (POSIX) The result is : Sys. de fich. 1024-blocks Used Available Capacity Monté sur /dev/mapper/nvidia_ccchegbfp1 59515524 8799964 47643532 16% / /dev/mapper/nvidia_ccchegbfp3 31738420 16652176 13448016 56% /var /dev/mapper/nvidia_ccchegbfp2 138865648 74955144 56742704 57% /home tmpfs 2029292 0 2029292 0% /dev/shm and sysinfo report in HDD section good information