From f0014c64993aaef6172cf758e18444a758b74ae1 Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 11 Mar 2014 15:40:07 +0000 Subject: Make this a bit more efficient --- etc/inc/system.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 755eda6..a211461 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -1927,9 +1927,11 @@ function system_identify_specific_platform() { /* the rest of the code only deals with 'embedded' platforms */ if ($g['platform'] != 'nanobsd') return array('name' => $g['platform'], 'descr' => $g['platform']); - - $dmesg = system_get_dmesg_boot(); - + + unset($dmesg); + $_gb = exec('/sbin/sysctl -n hw.model', $output); + $dmesg = $dmesg[0]; + if (strpos($dmesg, "PC Engines WRAP") !== false) return array('name' => 'wrap', 'descr' => gettext('PC Engines WRAP')); -- cgit v1.1