소스 검색

Merge pull request #450 from DinCahill/master

Fixed parsing uptime when it has no decimal point
Daniel Gibbs 11 년 전
부모
커밋
f78e201e6c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      functions/fn_details_distro

+ 1 - 1
functions/fn_details_distro

@@ -57,7 +57,7 @@ swapfree=$(free ${option} | awk '/Swap:/ {print $4}')
 
 # Uptime
 uptime=$(</proc/uptime)
-uptime=${uptime%%.*}
+uptime=${uptime/[. ]*/}
 minutes=$(( uptime/60%60 ))
 hours=$(( uptime/60/60%24 ))
 days=$(( uptime/60/60/24 ))