Skip to content

Commit

Permalink
simple improvements for Solaris
Browse files Browse the repository at this point in the history
  • Loading branch information
senjan committed Oct 17, 2022
1 parent ccd5d9f commit 1369828
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions neofetch
Original file line number Diff line number Diff line change
Expand Up @@ -1346,6 +1346,10 @@ get_model() {

Solaris)
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)
Expand Down Expand Up @@ -1408,6 +1412,15 @@ get_kernel() {
return
}

[[ $os == Solaris ]] && {
ver=$(uname -v)
case $ver in
11.[0123]) ;;
*) kernel=${ver} ;;
esac
return
}

case $kernel_shorthand in
on) kernel=$kernel_version ;;
off) kernel="$kernel_name $kernel_version" ;;
Expand Down

0 comments on commit 1369828

Please sign in to comment.