From 94ffb67660a45353e2cc31a940edcf5684ad23c5 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Tue, 7 May 2013 15:01:22 -0500 Subject: [PATCH] * usr/bin/byobu: LP: #1176956 - handle unlimted ulimits --- debian/changelog | 2 ++ usr/bin/byobu | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index e3e36885..2fe528f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,8 @@ byobu (5.38) unreleased; urgency=low + often used to maximize your tmux session, since tmux reduces the available size of your terminal to the smallest connected session + * usr/bin/byobu: LP: #1176956 + - handle unlimted ulimits -- Dustin Kirkland Sun, 21 Apr 2013 11:11:01 -0500 diff --git a/usr/bin/byobu b/usr/bin/byobu index d268d5e3..8e2d079f 100755 --- a/usr/bin/byobu +++ b/usr/bin/byobu @@ -70,8 +70,11 @@ if [ "$#" = "1" ]; then echo "$PKG version $VERSION" if $BYOBU_TEST bash >/dev/null 2>&1; then # Check ulimits - [ $(bash -c "ulimit -n") -ge 15 ] || echo "WARNING: ulimit -n is too low" 1>&2 - [ $(bash -c "ulimit -u") -ge 1600 ] || echo "WARNING: ulimit -u is too low" 1>&2 + local u + u=$(bash -c "ulimit -n") + [ "$u" = "unlimited" ] || [ $u -ge 15 ] || echo "WARNING: ulimit -n is too low" 1>&2 + u=$(bash -c "ulimit -u") + [ "$u" = "unlimited" ] || [ $u -ge 1600 ] || echo "WARNING: ulimit -u is too low" 1>&2 fi exec $BYOBU_BACKEND $BYOBU_ARG_VERSION exit 0