From a6f63ea695ec449ec6ce682f37afa17d12a514ba Mon Sep 17 00:00:00 2001 From: necro-nemesis Date: Thu, 17 Oct 2019 15:24:13 -0400 Subject: [PATCH] Identify Orange Pi Boards from /etc/armbian-release --- includes/system.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/includes/system.php b/includes/system.php index baa5c6f..a54987c 100755 --- a/includes/system.php +++ b/includes/system.php @@ -40,11 +40,21 @@ function RPiVersion() { 'a220a0' => 'Compute Module 3', 'a020a0' => 'Compute Module 3', 'a02100' => 'Compute Module 3+', + //Orange Pi Boards + 'orpi' => 'Orange Pi' + 'orpizero' => 'Orange Pi Zero' + 'orpione' => 'Orange Pi One' + 'orpir1' => 'Orange Pi R1' ); $cpuinfo_array = ''; exec('cat /proc/cpuinfo', $cpuinfo_array); $rev = trim(array_pop(explode(':',array_pop(preg_grep("/^Revision/", $cpuinfo_array))))); + //Armbian Identification + if (exec('cat /etc/armbian-release | grep '.escapeshellarg($_GET['orangepi']))) {$rev=orpi;} + if (exec('cat /etc/armbian-release | grep '.escapeshellarg($_GET['orangepizero']))) {$rev=orpizero;} + if (exec('cat /etc/armbian-release | grep '.escapeshellarg($_GET['orangepione']))) {$rev=orpione;} + if (exec('cat /etc/armbian-release | grep '.escapeshellarg($_GET['orangepi-r1']))) {$rev=orpir1;} if (array_key_exists($rev, $revisions)) { return $revisions[$rev]; } else {