修复在linux上挂载点获取结果后有多余\n的问题
This commit is contained in:
parent
54459f0472
commit
aa983f379a
@ -304,7 +304,7 @@ class SystemInfoHelper
|
|||||||
}
|
}
|
||||||
$this->mp_used = $this->mp_size - $this->mp_avail;
|
$this->mp_used = $this->mp_size - $this->mp_avail;
|
||||||
} else {
|
} else {
|
||||||
$this->dataMountPoint = shell_exec("df -P \"" . $dataPath . "\" | awk 'NR==2{print $6}'");
|
$this->dataMountPoint = trim(shell_exec("df -P \"" . $dataPath . "\" | awk 'NR==2{print $6}'"));
|
||||||
$this->mp_fs = shell_exec("df -T \"" . $this->dataMountPoint . "\" | awk 'NR==2{print $2}'");
|
$this->mp_fs = shell_exec("df -T \"" . $this->dataMountPoint . "\" | awk 'NR==2{print $2}'");
|
||||||
$this->mp_size = intval(shell_exec('df -k "' . $this->dataMountPoint . '" | awk \'NR==2{print $2}\''));
|
$this->mp_size = intval(shell_exec('df -k "' . $this->dataMountPoint . '" | awk \'NR==2{print $2}\''));
|
||||||
$this->mp_used = intval(shell_exec('df -k "' . $this->dataMountPoint . '" | awk \'NR==2{print $3}\''));
|
$this->mp_used = intval(shell_exec('df -k "' . $this->dataMountPoint . '" | awk \'NR==2{print $3}\''));
|
||||||
|
Loading…
Reference in New Issue
Block a user