mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
system: mute disk space status in case of live install media
This commit is contained in:
parent
cfdd274979
commit
788680a780
@ -43,6 +43,23 @@ class DiskSpaceStatus extends AbstractStatus
|
||||
|
||||
public function collectStatus()
|
||||
{
|
||||
/**
|
||||
* If live media, disk space status should be muted,
|
||||
* use the same (inverted) logic as LiveMediaStatus
|
||||
*/
|
||||
|
||||
$file = '/.probe.for.readonly';
|
||||
|
||||
if (!file_exists($file)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$fd = @fopen($file, 'w');
|
||||
if (!$fd) {
|
||||
return;
|
||||
}
|
||||
fclose($fd);
|
||||
|
||||
$backend = new Backend();
|
||||
$output = json_decode($backend->configdRun('system diag disk'), true);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user