From 7410b45c05dab6f6a916fdfc0459cebd6e7f9f77 Mon Sep 17 00:00:00 2001 From: billz Date: Wed, 27 May 2020 08:31:54 +0100 Subject: [PATCH] Return model info for non-Pi devices --- includes/system.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/system.php b/includes/system.php index a5e86010..1d885b1e 100755 --- a/includes/system.php +++ b/includes/system.php @@ -51,7 +51,12 @@ function RPiVersion() if (array_key_exists($rev, $revisions)) { return $revisions[$rev]; } else { - return 'Unknown Pi'; + exec('cat /proc/device-tree/model', $model); + if (isset($model[0])) { + return $model[0]; + } else { + return 'Unknown Device'; + } } }