diff options
author | Scott Moser <smoser@ubuntu.com> | 2013-03-04 14:28:34 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2013-03-04 14:28:34 -0500 |
commit | bcf04395be323c60b013e531ef3bf32b722a780a (patch) | |
tree | 2935dd46d1c10533c78f46599d55211b9caa9f8f /upstart | |
parent | 1a3e0fa19b6c3224ea986141b37f74d5464b7c82 (diff) | |
download | vyos-cloud-init-bcf04395be323c60b013e531ef3bf32b722a780a.tar.gz vyos-cloud-init-bcf04395be323c60b013e531ef3bf32b722a780a.zip |
add uptime to msg output
Diffstat (limited to 'upstart')
-rw-r--r-- | upstart/cloud-init-nonet.conf | 7 |
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 } |