@@ -954,7 +954,10 @@ get_os() {
954954 # just the output of "uname -s".
955955 case $kernel_name in
956956 Darwin) os=$darwin_name ;;
957- SunOS) os=Solaris ;;
957+ SunOS) case $( uname -o 2> /dev/null) in
958+ illumos) os=illumos ;;
959+ * ) os=Solaris ;;
960+ esac ;;
958961 Haiku) os=Haiku ;;
959962 MINIX) os=MINIX ;;
960963 AIX) os=AIX ;;
@@ -1301,7 +1304,7 @@ get_distro() {
13011304 distro=${distro/ Microsoft }
13021305 ;;
13031306
1304- Solaris)
1307+ Solaris|illumos )
13051308 case $distro_shorthand in
13061309 on|tiny) distro=$( awk ' NR==1 {print $1,$3}' /etc/release) ;;
13071310 * ) distro=$( awk ' NR==1 {print $1,$2,$3}' /etc/release) ;;
@@ -1332,7 +1335,7 @@ get_distro() {
13321335
13331336 # Get OS architecture.
13341337 case $os in
1335- Solaris|AIX|Haiku|IRIX|FreeMiNT|BSD)
1338+ Solaris|illumos| AIX|Haiku|IRIX|FreeMiNT|BSD)
13361339 machine_arch=$( uname -p)
13371340 ;;
13381341
@@ -1577,7 +1580,7 @@ get_model() {
15771580 model=${model/ Model}
15781581 ;;
15791582
1580- Solaris)
1583+ Solaris|illumos )
15811584 model=$( prtconf -b | awk -F' :' ' /banner-name/ {printf $2}' )
15821585 ;;
15831586
@@ -1616,7 +1619,18 @@ get_title() {
16161619 user=${USER:- $(id -un || printf % s " ${HOME/* \/ } " )}
16171620
16181621 case $title_fqdn in
1619- on) hostname=$( hostname -f) ;;
1622+ on)
1623+ case $os in
1624+ illumos|Solaris)
1625+ hostname=$( hostname)
1626+ domainname=$( domainname)
1627+ [[ -n " $domainname " ]] && hostname+=" .$domainname "
1628+ ;;
1629+ * )
1630+ hostname=$( hostname -f)
1631+ ;;
1632+ esac
1633+ ;;
16201634 * )
16211635 hostname=${HOSTNAME:- $(hostname)}
16221636 hostname=${hostname% .* }
@@ -1681,9 +1695,11 @@ get_uptime() {
16811695 s=$(( now - boot))
16821696 ;;
16831697
1684- Solaris)
1685- s=$( kstat -p unix:0:system_misc:snaptime | awk ' {print $2}' )
1686- s=${s/ .* }
1698+ Solaris|illumos)
1699+ boot=$( kstat -p unix:0:system_misc:boot_time | awk ' {print $2}' )
1700+ now=$( date +%s)
1701+
1702+ s=$(( now - boot))
16871703 ;;
16881704
16891705 AIX|IRIX)
@@ -1783,7 +1799,7 @@ get_packages() {
17831799 }
17841800
17851801 case $os in
1786- Linux|BSD|" iPhone OS" |Solaris)
1802+ Linux|BSD|" iPhone OS" |Solaris|illumos )
17871803 # Package Manager Programs.
17881804 has kiss && tot kiss l
17891805 has cpt-list && tot cpt-list
@@ -1876,6 +1892,10 @@ get_packages() {
18761892 (( packages == 0 )) &&
18771893 has pkg && tot pkg list
18781894 ;;
1895+
1896+ illumos-* )
1897+ has pkg && tot pkg list
1898+ ;;
18791899 esac
18801900
18811901 # List these last as they accompany regular package managers.
@@ -2729,7 +2749,7 @@ END
27292749 esac
27302750 ;;
27312751
2732- " Solaris" )
2752+ " Solaris" | " illumos " )
27332753 # Get CPU name.
27342754 cpu=" $( psrinfo -pv) "
27352755 cpu=" ${cpu//* $' \n ' } "
@@ -3161,10 +3181,10 @@ get_memory() {
31613181 esac
31623182 ;;
31633183
3164- " Solaris" | " AIX" )
3184+ " Solaris" | " illumos " | " AIX" )
31653185 hw_pagesize=" $( pagesize) "
31663186 case $os in
3167- " Solaris" )
3187+ " Solaris" | " illumos " )
31683188 pages_total=" $( kstat -p unix:0:system_pages:pagestotal | awk ' {print $2}' ) "
31693189 pages_free=" $( kstat -p unix:0:system_pages:pagesfree | awk ' {print $2}' ) "
31703190 ;;
@@ -4504,7 +4524,7 @@ get_battery() {
45044524
45054525get_local_ip () {
45064526 case $os in
4507- " Linux" | " BSD" | " Solaris" | " AIX" | " IRIX" )
4527+ " Linux" | " BSD" | " Solaris" | " illumos " | " AIX" | " IRIX" )
45084528 if [[ " ${local_ip_interface[0]} " == " auto" ]]; then
45094529 local_ip=" $( ip route get 1 | awk -F' src' ' {print $2; exit}' ) "
45104530 local_ip=" ${local_ip/ uid* } "
@@ -10545,6 +10565,22 @@ Q@@@@@ggg@@f@ @@@@@@L
1054510565EOF
1054610566 ;;
1054710567
10568+ " OmniOS" * )
10569+ set_colors 15 3 8
10570+ read -rd ' ' ascii_data << 'EOF '
10571+ ${c1}
10572+ ____ __ __ _ _ _
10573+ / __ \ | \/ || \ | || |
10574+ | | | || || \| || |
10575+ | |__| || |\/| || , `${c2}_${c1}||${c2}_${c1}| ${c2}____${c1}
10576+ \____/ |_| |_||_|\${c2}/ __ \ / ___|
10577+ | | | ||(__
10578+ ${c3}community${c2} | |__| | ___)|
10579+ ${c3}edition${c2} \____/ |____/
10580+
10581+ EOF
10582+ ;;
10583+
1054810584 " openbsd_small" )
1054910585 set_colors 3 7 6 1 8
1055010586 read -rd ' ' ascii_data << 'EOF '
0 commit comments