mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Return model info for non-Pi devices
This commit is contained in:
parent
8c6f0bd5fc
commit
7410b45c05
@ -51,7 +51,12 @@ function RPiVersion()
|
|||||||
if (array_key_exists($rev, $revisions)) {
|
if (array_key_exists($rev, $revisions)) {
|
||||||
return $revisions[$rev];
|
return $revisions[$rev];
|
||||||
} else {
|
} else {
|
||||||
return 'Unknown Pi';
|
exec('cat /proc/device-tree/model', $model);
|
||||||
|
if (isset($model[0])) {
|
||||||
|
return $model[0];
|
||||||
|
} else {
|
||||||
|
return 'Unknown Device';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user