summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2013-03-04 14:28:34 -0500
committerScott Moser <smoser@ubuntu.com>2013-03-04 14:28:34 -0500
commitbcf04395be323c60b013e531ef3bf32b722a780a (patch)
tree2935dd46d1c10533c78f46599d55211b9caa9f8f
parent1a3e0fa19b6c3224ea986141b37f74d5464b7c82 (diff)
downloadvyos-cloud-init-bcf04395be323c60b013e531ef3bf32b722a780a.tar.gz
vyos-cloud-init-bcf04395be323c60b013e531ef3bf32b722a780a.zip
add uptime to msg output
-rw-r--r--upstart/cloud-init-nonet.conf7
1 files changed, 6 insertions, 1 deletions
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
}