From 611d99a42dc80eab0f58a6d3cf625ad57b003313 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Mon, 21 Sep 2009 11:27:23 -0700 Subject: [PATCH] only print user count if > 0 Signed-off-by: Dustin Kirkland --- bin/users | 2 +- debian/changelog | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/users b/bin/users index 92c707f4..ed2fb877 100755 --- a/bin/users +++ b/bin/users @@ -28,4 +28,4 @@ fi # Note: we'd like to use pgrep -c, however, this isn't available in # busybox and some distro's pgrep (and it doesn't exit non-zero). count=`pgrep -f "sshd:.*@" | wc -l` || exit 0 -printf "\005{=b wr}%d\005{-}\005{= wr}#\005{-} " $count +[ $count -gt 0 ] && printf "\005{=b wr}%d\005{-}\005{= wr}#\005{-} " $count diff --git a/debian/changelog b/debian/changelog index c0d514af..81f89c30 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,7 +8,7 @@ byobu (2.34) unreleased; urgency=low fixes, updating the names of the utilities to use "byobu" rather than "screen" - -- Dustin Kirkland Mon, 21 Sep 2009 11:04:11 -0700 + -- Dustin Kirkland Mon, 21 Sep 2009 11:27:09 -0700 byobu (2.33-0ubuntu1) karmic; urgency=low