diff --git a/bin/users b/bin/users index 84f19f79..0dd363b7 100755 --- a/bin/users +++ b/bin/users @@ -1,6 +1,6 @@ #!/bin/sh -e # -# users: print the number of users on the machine +# users: print the number of remote users on the machine # Copyright (C) 2009 Raphaƫl Pinson. # Copyright (C) 2009 Canonical Ltd. # @@ -25,4 +25,5 @@ if [ "$1" = "--detail" ]; then exit 0 fi -printf "\005{=b wr}%d\005{-}\005{= wr}#\005{-} " `pgrep -c -f "sshd:.*@"` +count=`pgrep -c -f "sshd:.*@"` || exit 0 +printf "\005{=b wr}%d\005{-}\005{= wr}#\005{-} " $count diff --git a/byobu.1 b/byobu.1 index 16b3a0fa..52d80fc8 100644 --- a/byobu.1 +++ b/byobu.1 @@ -59,7 +59,7 @@ byobu \- wrapper script for seeding a user's byobu configuration and launching s \fBuptime\fP \- the total system uptime since last boot; displayed in the lower bar toward the right in blue text on a grey background -\fBusers\fP \- the number of users logged into the system via sshd; displayed in the lower bar toward the right in red text on a grey background with a trailing '#' sign +\fBusers\fP \- the number of remote users logged into the system via sshd, empty if 0 users; displayed in the lower bar toward the right in red text on a grey background with a trailing '#' sign \fBwhoami\fP \- the name of the user who owns the screen session; displayed in the upper bar toward the far right in bold black text on a grey background diff --git a/debian/changelog b/debian/changelog index da626467..c7b5702c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,8 +10,10 @@ byobu (2.19) unreleased; urgency=low * bin/fan_speed, byobu-config, byobu.1, profiles/common, profiles_generator/profile.skel, rpm/byobu.spec, statusrc: added cpu fan speed status + * bin/users, byobu.1: don't display '0#' if no users logged in; waste of + space, match behavior of updates_available - -- Dustin Kirkland Fri, 03 Jul 2009 16:57:03 -0700 + -- Dustin Kirkland Mon, 06 Jul 2009 00:35:45 -0500 byobu (2.18-0ubuntu1) karmic; urgency=low