From dd6b8d380c195656e856ea907d956f7963d4543e Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Fri, 3 Aug 2012 14:48:57 -0400 Subject: add uptime to the output of cloud-log-shutdown --- upstart/cloud-log-shutdown.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/upstart/cloud-log-shutdown.conf b/upstart/cloud-log-shutdown.conf index 2985d349..278b9c06 100644 --- a/upstart/cloud-log-shutdown.conf +++ b/upstart/cloud-log-shutdown.conf @@ -14,5 +14,6 @@ script 0:POWEROFF) mode="poweroff";; 0:*) mode="shutdown-unknown";; esac - echo "$date: shutting down for $mode" + { read seconds idle < /proc/uptime; } 2>/dev/null || : + echo "$date: shutting down for $mode${seconds:+ [up ${seconds%.*}s]}." end script -- cgit v1.2.3