byobu: Update to 5.129

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
(cherry picked from 492cbd53cb)
This commit is contained in:
Jeffery To
2019-06-15 02:53:59 +08:00
parent 0116633d02
commit 879a1e25bf
22 changed files with 42 additions and 411 deletions
@@ -1,11 +1,6 @@
--- a/usr/lib/byobu/users
+++ b/usr/lib/byobu/users
@@ -22,20 +22,26 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
__users_detail() {
- ps -ef | grep "sshd:.*@" | grep -v grep
+ ps -ef 2>/dev/null | grep "sshd:.*@" | grep -v grep
@@ -26,7 +26,12 @@ __users_detail() {
}
__users() {
@@ -19,15 +14,11 @@
if [ "$USERS_DISTINCT" = "1" ]; then
count=$(pgrep -fl 'sshd:.*@' | cut -f3 -d\ | cut -f1 -d@ | sort -u | wc -l)
else
# Note: we'd like to use pgrep -c, however, this isn't available in
@@ -34,6 +39,7 @@ __users() {
# busybox and some distro's pgrep (and it doesn't exit non-zero).
- count=$(pgrep -f "^sshd:.*@|^/usr/sbin/sshd -i" | wc -l) || return
+ count=$(pgrep -f "^sshd:.*@|^/usr/sbin/sshd -i" | wc -l)
count=$(pgrep -f "^sshd:.*@|^/usr/sbin/sshd -i" | wc -l) || return
fi
+ fi
fi
if [ $count -gt 0 ]; then
- color b w r; printf "%d" "$count"; color -; color w r; printf "#"; color --
+ color b w r; printf "%d" "$count"; color -; color w r; printf "##"; color --
color b w r; printf "%d" "$count"; color -; color w r; printf "##"; color --
else
rm -f "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/users"*
fi