mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
byobu: Update to 5.129
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
(cherry picked from 492cbd53cb)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user