Commit af54c7cf authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

changed output

parent ab6f07f8
...@@ -40,21 +40,27 @@ switch($cmd){ ...@@ -40,21 +40,27 @@ switch($cmd){
break; break;
case "free_space": case "free_space":
//sda1 //sda1
if (is_dir($mountpoint)) $sda1 = round(disk_free_space($mountpoint)/1024/1024/1024,2); if (is_dir($mountpoint)){
$sda1 = round(disk_free_space($mountpoint)/1024/1024/1024,2);
$sda1 .= "G";
}
//sda2 //sda2
if (!is_file($camogmdisk)){ if (!is_file($camogmdisk)){
$devices = get_raw_dev(); $devices = get_raw_dev();
foreach($devices as $device=>$size){ foreach($devices as $device=>$size){
//size in MB //size in MB
if ($device=="/dev/sda2") $sda2 = round($size/1048576,2); if ($device=="/dev/sda2") {
$sda2 = round($size/1048576,2);
$sda2 .= "G";
}
} }
}else{ }else{
//read camogm.disk file //read camogm.disk file
$sda2 = 10; $sda2 = "";
} }
respond_xml("{$sda1}G {$sda2}G"); respond_xml("{$sda1} {$sda2}");
break; break;
case "free_space_bkp": case "free_space_bkp":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment