Skip to content

Commit

Permalink
[PR] dylanaraps#2293 from senjan - simple improvements for Solaris
Browse files Browse the repository at this point in the history
Upstream PR: dylanaraps#2293
Thanks to @senjan

Co-authored-by: senjan <[email protected]>
  • Loading branch information
hykilpikonna and senjan committed Feb 17, 2023
2 parents 037a1a5 + 1369828 commit 8e753e5
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 @@ -1643,6 +1643,10 @@ get_model() {

Solaris|illumos)
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 @@ -1719,6 +1723,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 8e753e5

Please sign in to comment.