From 7320864d880b268213a8805590ac427344be67f5 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Tue, 8 Nov 2011 18:26:58 -0600 Subject: [PATCH] * usr/bin/byobu: LP: #713879 - add ulimit checks to byobu -v --- debian/changelog | 2 ++ usr/bin/byobu | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 6776a305..005a31a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,6 +20,8 @@ byobu (4.46) unreleased; urgency=low - reorder byobu-ctrl-a to offer screen first, then emacs mode - make byobu-ctrl-a slighty more compatible with tmux (not quite there yet...) + * usr/bin/byobu: LP: #713879 + - add ulimit checks to byobu -v -- Dustin Kirkland Mon, 31 Oct 2011 09:46:46 -0400 diff --git a/usr/bin/byobu b/usr/bin/byobu index 3b8c4a33..076ddb80 100755 --- a/usr/bin/byobu +++ b/usr/bin/byobu @@ -49,6 +49,10 @@ if [ "$#" = "1" ]; then -v|--version) echo "$PKG version $VERSION" exec $BYOBU_BACKEND $BYOBU_ARG_VERSION + # Check ulimits + [ $(ulimit -n) -ge 15 ] || echo "WARNING: ulimit -n is too low" 1>&2 + [ $(ulimit -u) -ge 1600 ] || echo "WARNING: ulimit -u is too low" 1>&2 + exit 0 ;; esac