* usr/bin/byobu: LP: #1176956

- handle unlimted ulimits
This commit is contained in:
Dustin Kirkland 2013-05-07 15:01:22 -05:00
commit 94ffb67660
2 changed files with 7 additions and 2 deletions

2
debian/changelog vendored
View file

@ -14,6 +14,8 @@ byobu (5.38) unreleased; urgency=low
+ often used to maximize your tmux session, since tmux reduces + often used to maximize your tmux session, since tmux reduces
the available size of your terminal to the smallest connected the available size of your terminal to the smallest connected
session session
* usr/bin/byobu: LP: #1176956
- handle unlimted ulimits
-- Dustin Kirkland <kirkland@ubuntu.com> Sun, 21 Apr 2013 11:11:01 -0500 -- Dustin Kirkland <kirkland@ubuntu.com> Sun, 21 Apr 2013 11:11:01 -0500

View file

@ -70,8 +70,11 @@ if [ "$#" = "1" ]; then
echo "$PKG version $VERSION" echo "$PKG version $VERSION"
if $BYOBU_TEST bash >/dev/null 2>&1; then if $BYOBU_TEST bash >/dev/null 2>&1; then
# Check ulimits # Check ulimits
[ $(bash -c "ulimit -n") -ge 15 ] || echo "WARNING: ulimit -n is too low" 1>&2 local u
[ $(bash -c "ulimit -u") -ge 1600 ] || echo "WARNING: ulimit -u is too low" 1>&2 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 fi
exec $BYOBU_BACKEND $BYOBU_ARG_VERSION exec $BYOBU_BACKEND $BYOBU_ARG_VERSION
exit 0 exit 0