From 2dc08bdb2f9dc6539f164118a8b1dfd51c1ab378 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Mon, 21 Sep 2009 09:59:28 -0700 Subject: [PATCH] * bin/users: use wc -l, since pgrep -c doesn't work in some distros (busybox, Arch), LP: #434047 * byobu.1: fix manpage, mem_used was listed twice, mail was in the wrong place, LP: #434052 --- bin/users | 4 +++- byobu.1 | 6 ++---- debian/changelog | 7 +++++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/bin/users b/bin/users index 0dd363b7..92c707f4 100755 --- a/bin/users +++ b/bin/users @@ -25,5 +25,7 @@ if [ "$1" = "--detail" ]; then exit 0 fi -count=`pgrep -c -f "sshd:.*@"` || exit 0 +# 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 diff --git a/byobu.1 b/byobu.1 index 101d6bb4..0b72503c 100644 --- a/byobu.1 +++ b/byobu.1 @@ -21,10 +21,6 @@ byobu \- wrapper script for seeding a user's byobu configuration and launching s \fBdisk\fP \- total disk space available and total used on / directory; displayed in the lower bar on the far right in white text on a light purple background; override the default directory by specifying an alternate mount point with MONITORED_DISK=/wherever in \fI$HOME/.byobu/statusrc\fP -\fBmail\fP \- system mail for the current user; the letter '[M]' is displayed in the lower bar toward the left in black text on a grey background - -\fBmem_used\fP \- memory used as a percentage of the total memory available; displayed in the lower bar on the far right in white text on a green background with a trailing '%' sign - \fBec2_cost\fP \- an estimation of the cost of the current boot of the system in terms of the Amazon EC2 billing model; displayed in the lower bar toward the right in green text on a black background; there is a leading '~' to indicate that this is an estimation, and the monetary units are US Dollars '$' \fBfan_speed\fP \- cpu or system fan speed as reported by lm-sensors; displayed in the lower bar toward the right in black text on a grey background; there is a trailing 'rpm' for units @@ -37,6 +33,8 @@ byobu \- wrapper script for seeding a user's byobu configuration and launching s \fBlogo\fP \- an approximation of the current operating system's logo; displayed in the lower bar on the far left; you may customize this logo by setting a chosen logo in \fI$HOME/.byobu/logo\fP, or you may override this with LOGO=:-D in \fI$HOME/.byobu/statusrc\fP +\fBmail\fP \- system mail for the current user; the letter '[M]' is displayed in the lower bar toward the left in black text on a grey background + \fBmem_available\fP \- total memory available in the system; displayed in the lower bar toward the right in white text on a green background \fBmem_used\fP \- total memory used in the system as a percentage of the total memory available; displayed in the lower bar toward the right in white text on a green background with a trailing '%' sign diff --git a/debian/changelog b/debian/changelog index 46d51b2a..f5cdb29b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,11 @@ byobu (2.34) unreleased; urgency=low - * UNRELEASED + * bin/users: use wc -l, since pgrep -c doesn't work in some + distros (busybox, Arch), LP: #434047 + * byobu.1: fix manpage, mem_used was listed twice, mail was in the wrong + place, LP: #434052 - -- Dustin Kirkland Thu, 17 Sep 2009 17:49:21 -0500 + -- Dustin Kirkland Mon, 21 Sep 2009 09:58:55 -0700 byobu (2.33-0ubuntu1) karmic; urgency=low