From 7b084fd314af91a87eec56b57e59e5cd98df3558 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 23 May 2017 16:04:51 -0300 Subject: [PATCH] SG-23* serial number is igb0 mac address --- src/etc/inc/system.inc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index b0c00d761f..c7c6be20fe 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -2322,9 +2322,18 @@ EOD; } function system_get_serial() { + $platform = system_identify_specific_platform(); + unset($output); - $_gb = exec('/bin/kenv -q smbios.system.serial 2>/dev/null', $output); - $serial = $output[0]; + if ($platform['name'] == 'Turbot Dual-E') { + $if_info = pfSense_get_interface_addresses('igb0'); + if (!empty($if_info['hwaddr'])) { + $serial = str_replace(":", "", $if_info['hwaddr']); + } + } else { + $_gb = exec('/bin/kenv smbios.system.serial 2>/dev/null', $output); + $serial = $output[0]; + } $vm_guest = get_single_sysctl('kern.vm_guest');