Fix network mount point with spaces #36
This commit is contained in:
parent
999a28b9df
commit
7ed8e89bfb
|
@ -4,7 +4,7 @@ $Config = new Config();
|
||||||
|
|
||||||
$datas = array();
|
$datas = array();
|
||||||
|
|
||||||
if (!(exec('/bin/df -T -P | awk -v c=`/bin/df -T | grep -bo "Type" | awk -F: \'{print $2}\'` \'{print substr($0,c);}\' | tail -n +2 | awk \'{print $1","$2","$3","$4","$5","$6","$7}\'', $df)))
|
if (!(exec('/bin/df -T -P | sed -e \'s/[ \t]//\' | awk -v c=`/bin/df -T | grep -bo "Type" | awk -F: \'{print $2}\'` \'{print substr($0,c);}\' | tail -n +2 | awk \'{print $1","$2","$3","$4","$5","$6","$7}\'', $df)))
|
||||||
{
|
{
|
||||||
$datas[] = array(
|
$datas[] = array(
|
||||||
'total' => 'N.A',
|
'total' => 'N.A',
|
||||||
|
@ -24,6 +24,9 @@ else
|
||||||
{
|
{
|
||||||
list($filesystem, $type, $total, $used, $free, $percent, $mount) = explode(',', $mounted);
|
list($filesystem, $type, $total, $used, $free, $percent, $mount) = explode(',', $mounted);
|
||||||
|
|
||||||
|
if ($percent > 100)
|
||||||
|
$percent = 100;
|
||||||
|
|
||||||
if (strpos($type, 'tmpfs') !== false && $Config->get('disk:show_tmpfs') === false)
|
if (strpos($type, 'tmpfs') !== false && $Config->get('disk:show_tmpfs') === false)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue