Skip to content

Commit 0239acd

Browse files
committed
Fixed: FS#630 - Hard disk has no more space left error is reported with cdrom in cd drive
1 parent 40d92de commit 0239acd

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

server/mods-available/monitor_core_module.inc.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,14 @@ function monitorDiskUsage() {
219219
* calculate the state
220220
*/
221221
$usePercent = floatval($data[$i]['percent']);
222-
if ($usePercent > 75) $state = $this->_setState($state, 'info');
223-
if ($usePercent > 80) $state = $this->_setState($state, 'warning');
224-
if ($usePercent > 90) $state = $this->_setState($state, 'critical');
225-
if ($usePercent > 95) $state = $this->_setState($state, 'error');
222+
223+
//* We dont want to check the cdrom drive as a cd / dvd is always 100% full
224+
if($data[$i]['type'] != 'iso9660') {
225+
if ($usePercent > 75) $state = $this->_setState($state, 'info');
226+
if ($usePercent > 80) $state = $this->_setState($state, 'warning');
227+
if ($usePercent > 90) $state = $this->_setState($state, 'critical');
228+
if ($usePercent > 95) $state = $this->_setState($state, 'error');
229+
}
226230
}
227231
}
228232

0 commit comments

Comments
 (0)