diff options
author | Renato Botelho <renato@netgate.com> | 2017-05-23 16:04:51 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-05-23 16:04:51 -0300 |
commit | 7b084fd314af91a87eec56b57e59e5cd98df3558 (patch) | |
tree | cff1a2e5576dfe1ff9328b7e17c0319532305173 | |
parent | 62174481d74ed1565f9cad93ea4e800e88d3a80e (diff) | |
download | pfsense-7b084fd314af91a87eec56b57e59e5cd98df3558.zip pfsense-7b084fd314af91a87eec56b57e59e5cd98df3558.tar.gz |
SG-23* serial number is igb0 mac address
-rw-r--r-- | src/etc/inc/system.inc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index b0c00d7..c7c6be2 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'); |