[PR] dylanaraps/neofetch#2293 from senjan - simple improvements for Solaris

Upstream PR: https://github.com/dylanaraps/neofetch/pull/2293
Thanks to @senjan

Co-authored-by: senjan <senjan@atlas.cz>
This commit is contained in:
Azalea Gui 2023-02-17 17:04:13 -05:00
commit 8e753e5f42
No known key found for this signature in database
GPG key ID: E289FAC0DA92DD2B

View file

@ -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)
@ -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" ;;