simple improvements for Solaris

This commit is contained in:
senjan 2022-10-17 22:38:14 +02:00
parent ccd5d9f526
commit 1369828e3e

View file

@ -1346,6 +1346,10 @@ get_model() {
Solaris) Solaris)
model=$(prtconf -b | awk -F':' '/banner-name/ {printf $2}') model=$(prtconf -b | awk -F':' '/banner-name/ {printf $2}')
virt=$(/usr/bin/uname -V)
if [ $? == 0 ] && [ "$virt" != "non-virtualized" ]; then
model="${model:-$(uname -i)} (${virt})"
fi
;; ;;
AIX) AIX)
@ -1408,6 +1412,15 @@ get_kernel() {
return return
} }
[[ $os == Solaris ]] && {
ver=$(uname -v)
case $ver in
11.[0123]) ;;
*) kernel=${ver} ;;
esac
return
}
case $kernel_shorthand in case $kernel_shorthand in
on) kernel=$kernel_version ;; on) kernel=$kernel_version ;;
off) kernel="$kernel_name $kernel_version" ;; off) kernel="$kernel_name $kernel_version" ;;