Fix uptime value in Solaris
This commit is contained in:
parent
45ea478414
commit
624bd97045
1 changed files with 4 additions and 2 deletions
6
neofetch
6
neofetch
|
@ -1446,8 +1446,10 @@ get_uptime() {
|
|||
;;
|
||||
|
||||
Solaris)
|
||||
s=$(kstat -p unix:0:system_misc:snaptime | awk '{print $2}')
|
||||
s=${s/.*}
|
||||
boot=$(kstat -p unix:0:system_misc:boot_time | awk '{print $2}')
|
||||
now=$(date +%s)
|
||||
|
||||
s=$((now - boot))
|
||||
;;
|
||||
|
||||
AIX|IRIX)
|
||||
|
|
Loading…
Reference in a new issue