Uptime: Add puppy linux support

This commit is contained in:
Dylan 2016-02-09 07:49:42 +11:00
parent daa56b0851
commit 44ace4e837
1 changed files with 10 additions and 1 deletions

11
fetch
View File

@ -500,7 +500,16 @@ getkernel() {
getuptime () {
case "$os" in
"Linux")
uptime="$(uptime -p)"
case "$distro" in
"Puppy Linux"*)
uptime=$(uptime | awk -F ':[0-9]{2}+ |(, ){1}+' '{printf $2}')
uptime=${uptime/ / }
;;
*)
uptime="$(uptime -p)"
;;
esac
;;
"Mac OS X" | *"BSD")