From bcf04395be323c60b013e531ef3bf32b722a780a Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Mon, 4 Mar 2013 14:28:34 -0500 Subject: add uptime to msg output --- upstart/cloud-init-nonet.conf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'upstart/cloud-init-nonet.conf') diff --git a/upstart/cloud-init-nonet.conf b/upstart/cloud-init-nonet.conf index bdeb5a2e..36b99fb5 100644 --- a/upstart/cloud-init-nonet.conf +++ b/upstart/cloud-init-nonet.conf @@ -21,7 +21,11 @@ script [ -e "$emitted" -o -e "/var/$emitted" ] } msg() { - echo "$UPSTART_JOB:" "$1" + local uptime="" idle="" + if [ -r /proc/uptime ]; then + read uptime idle < /proc/uptime + fi + echo "$UPSTART_JOB${uptime:+[${uptime}]}:" "$1" } handle_sigterm() { @@ -32,6 +36,7 @@ script msg "static networking is now up" exit 0 fi + msg "recieved SIGTERM, networking not up" exit 2 } -- cgit v1.2.3