From 7a063fa1706977913cdde2b92cdaa78b77bbf678 Mon Sep 17 00:00:00 2001 From: threeoh6000 Date: Wed, 13 Nov 2024 20:16:59 +0000 Subject: [PATCH] Add processor detection for `illumos`. --- processor_detection.4 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/processor_detection.4 b/processor_detection.4 index 0fe5bf2..9feb165 100644 --- a/processor_detection.4 +++ b/processor_detection.4 @@ -35,6 +35,11 @@ if [ "$subtype" = "android" ]; then processor="$(getprop ro.hardware.chipname)" fi fi +if [ "$hasawk" -eq 1 ] && [ "$system_type" = "illumos" ] && [ -z "$processor" ]; then + if [ -n "$(kstat | grep brand") ]; then + processor="$(kstat | grep brand | head -n 1 | tr -s " " | awk -F "brand " '{print $2}')" + fi +fi if [ "$hassed" -eq 1 ] && [ "$hasawk" -eq 1 ] && [ -n "$processor" ]; then if [ -n "$(echo $processor | awk -F "@" '{print $1}' | sed "s/Processor//g" | sed "s/CPU//g" | sed "s/(R)//g" | sed "s/(r)//g" | sed "s/(TM)//g" | sed "s/(tm)//g" | tr -s " ")" ]; then processor="$(echo $processor | awk -F "@" '{print $1}' | sed "s/Processor//g" | sed "s/CPU//g" | sed "s/(R)//g" | sed "s/(r)//g" | sed "s/(TM)//g" | sed "s/(tm)//g" | tr -s " ")"