Add processor detection for illumos.

This commit is contained in:
abbie 2024-11-13 20:16:59 +00:00
parent 9d8acac656
commit 7a063fa170
Signed by: threeoh6000
GPG key ID: 801FE4AD456E922C

View file

@ -35,6 +35,11 @@ if [ "$subtype" = "android" ]; then
processor="$(getprop ro.hardware.chipname)" processor="$(getprop ro.hardware.chipname)"
fi fi
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 [ "$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 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 " ")" 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 " ")"