Merge lp:~smoser/pollinate/trunk.lp-1708461-safe-read-uptime into lp:~pollinate/pollinate/trunk

Proposed by Scott Moser
Status: Merged
Merged at revision: 340
Proposed branch: lp:~smoser/pollinate/trunk.lp-1708461-safe-read-uptime
Merge into: lp:~pollinate/pollinate/trunk
Diff against target: 14 lines (+2/-2)
1 file modified
pollinate (+2/-2)
To merge this branch: bzr merge lp:~smoser/pollinate/trunk.lp-1708461-safe-read-uptime
Reviewer Review Type Date Requested Status
pollinate Pending
Review via email: mp+328522@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'pollinate'
2--- pollinate 2016-11-02 12:46:27 +0000
3+++ pollinate 2017-08-03 14:33:51 +0000
4@@ -98,8 +98,8 @@
5 local lsb=$(echo "${DISTRIB_DESCRIPTION}" | sed -e "s/ /\//g")
6 local platform="$(uname -o)/$(uname -r)/$(uname -m)"
7 local cpu="$(grep -m1 "^model name" /proc/cpuinfo | sed -e "s/.*: //" -e "s:\s\+:/:g")"
8- local up idle
9- read up idle < /proc/uptime
10+ local up="NA" idle="NA"
11+ { read up idle < /proc/uptime ; } >/dev/null 2>&1 || :
12 local uptime="uptime/$up/$idle"
13 USER_AGENT="pollinate${TESTING}/${pollinate_ver} curl/${curl_ver} cloud-init/${cloud_init_ver} ${lsb} ${platform} ${cpu} ${uptime}"
14 }

Subscribers

People subscribed via source and target branches

to all changes: