Add seconds when uptime is below 1 min

This commit is contained in:
Dylan Araps 2016-10-21 10:37:40 +11:00
parent c2e6f6534d
commit 99d43ff257

View file

@ -307,8 +307,9 @@ getuptime() {
"1 minutes") minutes="${minutes/s}" ;;
esac
uptime="up ${days:+$days,} ${hours:+$hours,} ${minutes}"
uptime="${days:+$days, }${hours:+$hours, }${minutes}"
uptime="${uptime%', '}"
uptime="up ${uptime:-${seconds} seconds}"
;;
"Solaris")