[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:
commit
8e753e5f42
1 changed files with 13 additions and 0 deletions
13
neofetch
13
neofetch
|
@ -1643,6 +1643,10 @@ get_model() {
|
||||||
|
|
||||||
Solaris|illumos)
|
Solaris|illumos)
|
||||||
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)
|
||||||
|
@ -1719,6 +1723,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" ;;
|
||||||
|
|
Loading…
Reference in a new issue