Using simpler stat call on /dev/pts in live-uptime as suggested by Javier Barroso...
authorDaniel Baumann <daniel@debian.org>
Mon, 17 Dec 2012 19:54:56 +0000 (20:54 +0100)
committerDaniel Baumann <daniel@debian.org>
Mon, 17 Dec 2012 19:59:39 +0000 (20:59 +0100)
bin/live-uptime

index 3f5c7ba..3759012 100755 (executable)
@@ -24,7 +24,7 @@ _UPTIME="$(/usr/bin/uptime.orig.procps)"
 
 _DATE_HOST="$(date +%s)"
 
-_DATE_LXC="$(stat /dev/pts | awk '/^Change: / { print $2, $3 }')"
+_DATE_LXC="$(stat -c %z /dev/pts)"
 _DATE_LXC="$(date +%s -d"${_DATE_LXC}")"
 
 _UPTIME_LXC="$((${_DATE_HOST} - ${_DATE_LXC}))"