simple improvements for Solaris
This commit is contained in:
parent
ccd5d9f526
commit
1369828e3e
1 changed files with 13 additions and 0 deletions
13
neofetch
13
neofetch
|
@ -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" ;;
|
||||||
|
|
Loading…
Reference in a new issue