Merge pull request #1659 from aidangill-projects/issue-1658

Issue 1658: Fix for parsing error where 'day,' is ignored on AIX uptime check
pull/1667/head
shirou 11 months ago committed by GitHub
commit ac15d68545
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -65,7 +65,7 @@ func UptimeWithContext(ctx context.Context) (uint64, error) {
var days uint64 = 0
var hours uint64 = 0
var minutes uint64 = 0
if ut[3] == "days," {
if ut[3] == "day," || ut[3] == "days," {
days, err = strconv.ParseUint(ut[2], 10, 64)
if err != nil {
return 0, err

Loading…
Cancel
Save