Преглед изворни кода

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 ))